dashpresshq/dashpress

View on GitHub
src/frontend/lib/colors/conversion.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function hexToOklch has 39 lines of code (exceeds 25 allowed). Consider refactoring.
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);
Severity: Minor
Found in src/frontend/lib/colors/conversion.ts - About 1 hr to fix

    Function rgbToOklch has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const rgbToOklch = (rgb: TRGB): TLCH => {
        const r = rgb.r / 255;
        const g = rgb.g / 255;
        const b = rgb.b / 255;
    
    
    Severity: Minor
    Found in src/frontend/lib/colors/conversion.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status