Function: color()
function color(name): RgbColor;
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.