import * as colors from "https://deno.land/x/colors@v1.0.0/src/color.ts";
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 | |