Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/crayon/src/styles.ts>hex

🖍️ Terminal styling done light and fast.
Latest
function hex
import { hex } from "https://deno.land/x/crayon@3.3.3/src/styles.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