sempdf v1.9.1Functions
Function: color()
sempdf / color
function color(name): RgbColor;Defined in: src/types.ts:3832
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 & object | NamedColor | A named color or hex string. |
Returns
The RGB color.