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

x/colormath/src/utils.ts

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

Classes

A color result object returned by functions in "methods.ts".

Variables

A lambda function to generate random numbers.

A lambda function to convert a ColorValue to rgb values.

Functions

Breaks down a raw hex into [r, g, b].

Reduces the decimals of the float to one decimal.

Formats the unformatted hex.

Converts an unformatted hex string to [r, g, b].

Converts a rgb value to the component of hex.

Returns a random rgb color in the form of [r, g, b] array.

Returns a random color in the form of formatted hex.

Extracts the raw hex from the hex string.

Converts a rgb array to a formatted hex.

Type Aliases

A union type of [r, g, b] values or hexadecimal string.