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

x/crayon/src/styles.ts>hex

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