Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/colormath/src/utils.ts>formatHex

A color conversion and color manipulation library written in typescript for Node.js, Deno and Browser 🎨.
Latest
function formatHex
import { formatHex } from "https://deno.land/x/colormath@1.2.4/src/utils.ts";

Formats the unformatted hex.

Examples

formatHex('1dc'); // '#11ddcc' formatHex('7298da'); // '#7298da'

Parameters

hex: string

The hex.

Returns

string