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

x/colormath/src/utils.ts>padHex

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

Converts a rgb value to the component of hex.

Examples

padHex(255); // 'ff' padHex(0); // '00'

Parameters

x: number

The value

Returns

string