hex
function hex(value): Color;
Function: hex()
function hex(value): Color;Defined in: packages/motion/src/Color.ts:128
Parse a CSS color string — the most convenient constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | A CSS color string. |
Returns
Remarks
Accepts everything CSS does: #rgb, #rrggbb, #rrggbbaa, named colors
like "rebeccapurple", and functional forms like rgb() / hsl().
Example
Color.hex("#7f5af0")