Skip to main content
Module

x/colors/src/color.ts

Color conversion and stuff in TypeScript
Go to Latest
import * as colors from "https://deno.land/x/colors@v1.0.0/src/color.ts";

Classes

General class for RGBA colors

Variables

6 / 29

4 / 29

Standard illuminant D65

Functions

Find the nearest neighbour of a color in a palette It would be more accurate to use consider luminance along with Euclidean distance but I chose to stay with distance for performance.

Calculate mean distance between two colors

Convert CIE XYZ to Linear RGB color space