Skip to content

@vaguevoid/fiasco / color / Colors / rgb

Function: rgb()

Call Signature

rgb(r, g, b, a?): Color

Defined in: src/color.ts:256

RGB Color

Parameters

r

number

Red 0-255

g

number

Green 0-255

b

number

Blue 0-255

a?

number

Alpha 0-1. Default 1

Returns

Color

Call Signature

rgb(array): Color

Defined in: src/color.ts:261

RGB Color

Parameters

array

[number, number, number, number?]

Array of 3 or 4 values, first 3 are 0-255 for r,g,b, final optional alpha 0-1

Returns

Color

Call Signature

rgb(obj): Color

Defined in: src/color.ts:266

RGB Color

Parameters

obj

Object representing r,g,b and optional alpha that defaults to 1

a?

number

b

number

g

number

r

number

Returns

Color