import { findClosestColor } from "https://deno.land/x/colors@v1.2.0/src/color.ts";
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.