src/frontend/lib/colors/conversion.ts
Function hexToOklch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const hexToOklch = (hex: string) => {
const hexToRGB = (h: string): TRGB => {
const r: number = parseInt(h.slice(1, 3), 16);
const g: number = parseInt(h.slice(3, 5), 16);
const b: number = parseInt(h.slice(5, 7), 16);
Function rgbToOklch
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const rgbToOklch = (rgb: TRGB): TLCH => {
const r = rgb.r / 255;
const g = rgb.g / 255;
const b = rgb.b / 255;