Appearance
a11ydocs / color
Function: color()
ts
function color(name): RgbColor;Defined in: src/types.ts:3239
Resolves a NamedColor to an RGB color. Also accepts a #RGB/#RRGGBB hex string. Throws PdfErrorCode.INVALID_COLOR for an unknown name.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | A named color or hex string. |
Returns
The RGB color.