Source: https://guthlabs.ai/docs/instruments/hex-rgb-hsl-lab-color-converter/

instrument / verified-clean

# Hex ↔ RGB ↔ HSL ↔ LAB Color Converter

The current ledger marks this instrument verified clean within the source-bound verification corpus.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Inspectable records

[01**Overview**Purpose and lifecycle](<https://guthlabs.ai/docs/instruments/hex-rgb-hsl-lab-color-converter/>)[02**Mechanism**Method and assumptions](<https://guthlabs.ai/docs/instruments/hex-rgb-hsl-lab-color-converter/mechanism/>)[03**Implementation**Binding and validation](<https://guthlabs.ai/docs/instruments/hex-rgb-hsl-lab-color-converter/implementation/>)[04**Qualification**Evidence and errata](<https://guthlabs.ai/docs/instruments/hex-rgb-hsl-lab-color-converter/qualification/>)

## Ledger state

The current ledger marks this instrument verified clean within the source-bound verification corpus.

**Area**: Audio, Music, Photography & Color

**Tranche**: tranche-5

**Evidence ID**: t5-012

**Ledger rows**: 1

No ledger note is attached.

## Review findings

The advertised name omits HSV and CMYK even though the computes field includes them. The empty honest_label is a concern: the instrument should disclose that LAB is D65/sRGB-relative and that the simple CMYK result is an unprofiled mathematical approximation, not a print-production color conversion. Verdict remains NEEDS_REVIEW until the exact formulas, color-space assumptions, parsing rules, gamut policy, precision policy, and CMYK model are documented.

### Formula and scope findings

- The specification does not provide explicit equations, coefficient matrices, transfer functions, or rounding rules, so the claimed conversions cannot be fully verified.

- RGB→XYZ is only identified as an sRGB matrix conversion; the required linearization (sRGB inverse transfer function) is not stated.

- XYZ→LAB requires an explicit D65 reference white and CIE epsilon/kappa constants; these are not stated.

- The claimed bidirectional LAB and RGB conversions require XYZ→RGB and sRGB re-encoding formulas, which are omitted.

- HSV and CMYK are included in the computed representations but no HSV or CMYK formulas are specified.

- CMYK is not a unique device-independent equivalent of RGB without a color profile or an explicit simple RGB-to-CMYK model.

### Unit assumptions

- RGB test inputs and outputs use 8-bit channel values in [0,255]; formulas internally normalize channels to [0,1].

- Hex uses six-digit sRGB notation #RRGGBB with no alpha channel.

- HSL and HSV use hue in degrees [0,360) and saturation/value or lightness as fractions in [0,1].

- LAB uses CIE L* in [0,100] and a*, b* in the usual unbounded signed units, with the D65 sRGB reference white Xn=0.95047, Yn=1.00000, Zn=1.08883.

- The LAB calculations use the standard sRGB D65 matrix, sRGB gamma decoding, and CIE epsilon=216/24389 and kappa=24389/27.

- CMYK uses the simple unprofiled formula K=1-max(R,G,B), and C=(1-R-K)/(1-K), M=(1-G-K)/(1-K), Y=(1-B-K)/(1-K), with channels represented as fractions in [0,1].

## Boundary hardening

**BREAK_CLAIMED** · SELF_FLAGGED

The achromatic gray vector exposes a real undefined intermediate: HSL and HSV hue formulas contain division by delta, and delta is exactly zero for #808080. An implementation that does not special-case achromatic colors can produce NaN or an invalid swatch instead of returning hue=0 by convention or explicitly reporting undefined.

## Errata and corrections

No applied erratum is attached to this unique-name record.

## Inspectable example

4 review vectors are recorded. One source-bound sample is shown below.

````
{
  "inputs": {
    "hex": "#000000",
    "rgb_8bit": {
      "r": 0,
      "g": 0,
      "b": 0
    }
  },
  "expected_outputs": {
    "rgb_normalized": {
      "r": 0,
      "g": 0,
      "b": 0
    },
    "hsl": {
      "h_deg": 0,
      "s": 0,
      "l": 0
    },
    "hsv": {
      "h_deg": 0,
      "s": 0,
      "v": 0
    },
    "lab": {
      "L": 0,
      "a": 0,
      "b": 0
    },
    "cmyk": {
      "c": 0,
      "m": 0,
      "y": 0,
      "k": 1
    }
  },
  "working": "Hex #000000 gives R=G=B=0, so normalized RGB=(0/255,0/255,0/255)=(0,0,0). HSL: max=min=0, so L=(0+0)/2=0 and S=0; hue is conventionally 0 for zero saturation. HSV: V=max=0 and S=0; hue is conventionally 0. Linear RGB=(0,0,0), therefore XYZ=(0,0,0). Since each XYZ component is below epsilon, f(t)=kappa*t, giving L*=0, a*=0, b*=0. CMYK: K=1-max(0,0,0)=1; C=M=Y=0 by the K=1 special case."
}
````

## Related workflows

No source-defined multi-instrument workflow membership is recorded.

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json · VERIFIED_CLEAN`

- `evidence-tranche5/tranche5-results.json`

- `BOUNDARY_HAZARD_CATALOG.json`
