0.1.2
A set of functions and types to help wrangle colors in Deno | π¦
Repository
Current version released
2 years ago
Dependencies
deno.land/x
Versions
xeko_color
A set of functions and types to help wrangle colors in Deno | π¦
Hex to rgb
const color = toRGBA('#ffffffff');
if (isError(color)) {
console.error('not rgb', color);
}
console.log(color.r, color.g, color.b);
Rgb to hex
const color = toHex({ r: 255, g: 255, b: 255, a: 1 });
if (isError(color)) {
console.error('not hex', color);
}
console.log(color);