Reference · Backgrounds for a bracket
toHexfunction
Writes a colour as #rrggbb.
Import it
import { toHex } from "@johnmorrisdotca/taisen-brackets/backgrounds";
Definition
function toHex(c: Parameters<typeof shared.toHex>[0]): string
Parameters
| Name | Type | Description |
|---|---|---|
c | Rgb | The red, green and blue, 0 to 255. |
Returns
string
The colour in lower-case hexadecimal.
Examples
import { toHex } from "@johnmorrisdotca/taisen-brackets/backgrounds";
console.log(toHex([47, 93, 74]));#2f5d4aWhat it prints (run when this page was built)