Skip to main content
Module

x/crayon/mod.ts>hex

🖍️ Terminal styling done light and fast.
Go to Latest
function hex
Re-export
import { hex } from "https://deno.land/x/crayon@3.1.1/mod.ts";

Generate StyleCode from HEX value - 24bit (16.7m) color pallete

Examples

Example 1

hex(0xFF3060); // <- this is faster
hex("#FF3060");

Parameters

value: string | number
optional
bg: boolean