API reference@mapcairn/themeFunctionstoHexOn this pagetoHex Formats a colour as #rrggbb, or #rrggbbaa when it is translucent. This is a function exported by @mapcairn/theme, checked against version 0.2.0. Signature import { toHex } from "@mapcairn/theme"; function toHex(colour: Rgba): string; Parameters colour (Rgba) Returns string See also Rgba Source: packages/theme/src/contrast.ts:370