import { hexToRgb } from "https://deno.land/x/colormath@1.2.4/src/utils.ts";
Converts an unformatted hex string to [r, g, b].
Examples
hexToRgb('fff'); // [255, 255, 255]
hexToRgb('#000000'); // [0, 0, 0]
hexToRgb('#ffffff7f'); // [255, 255, 255, 0.5]
hexToRgb('fff'); // [255, 255, 255] hexToRgb('#000000'); // [0, 0, 0] hexToRgb('#ffffff7f'); // [255, 255, 255, 0.5]