Appearance
zeropdf / color
Function: color()
ts
function color(name): RgbColor;Defined in: src/types.ts:3149
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.