Skip to main content
variable randomHexColorCode
import { randomHexColorCode } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Generates a random hexadecimal color code.

Use Math.random to generate a random 24-bit(6x4bits) hexadecimal number. Use bit shifting and then convert it to an hexadecimal String using toString(16).

type

() => unknown