Color
Defined in: utils/color.ts:7
Constructor utils/color.ts:10
new Color(
input):Color
Parameters
| Parameter | Type |
|---|---|
input | any |
Returns
Color
Methods
getAlpha() utils/color.ts:47
getAlpha():
number
Returns
number
getRgb() utils/color.ts:56
getRgb():
object
Returns
object
| Name | Type |
|---|---|
bcolor.ts:56 | number |
gcolor.ts:56 | number |
rcolor.ts:56 | number |
isGrayscale() utils/color.ts:51
isGrayscale():
boolean
Returns
boolean
toPDFFill() utils/color.ts:73
toPDFFill():
string
Returns
string
toPDFFillValue() utils/color.ts:61
toPDFFillValue():
string
Returns
string
toPDFStroke() utils/color.ts:78
toPDFStroke():
string
Returns
string
toPDFStrokeValue() utils/color.ts:69
toPDFStrokeValue():
string
Returns
string
coerce() utils/color.ts:23
staticcoerce(color):Color
Parameters
| Parameter | Type |
|---|---|
color | any |
Returns
Color
hex() utils/color.ts:38
statichex(hexStr):Color
Parameters
| Parameter | Type |
|---|---|
hexStr | string |
Returns
Color
hsl() utils/color.ts:34
statichsl(h,s,l,a?):Color
Parameters
| Parameter | Type |
|---|---|
h | number |
s | number |
l | number |
a? | number |
Returns
Color
oklab() utils/color.ts:42
staticoklab(l,a,b,alpha?):Color
Parameters
| Parameter | Type |
|---|---|
l | number |
a | number |
b | number |
alpha? | number |
Returns
Color
rgb() utils/color.ts:30
staticrgb(r,g,b,a?):Color
Parameters
| Parameter | Type |
|---|---|
r | number |
g | number |
b | number |
a? | number |
Returns
Color