11 / 14 · audits
Transform Audit
Five behavioral invariants any sane color transform must keep, checked over every cell of a supplied 3D LUT.
The problem
LUT viewers show you a transform and profile validators check structure and spot ΔE values; the published tooling stops there. None of it tests behavior: whether a creative look quietly reverses tones along the gray axis, tints neutrals, spins hues past recognition, sends outputs outside [0,1], or tears where neighboring inputs should land near each other. Those are the failure modes that make a transform wrong rather than merely strong, and they hide in the cells nobody spot-checks.
The method
The audit takes the lattice itself, n cubed by 3 values with RGB in [0,1] in red-fastest .cube order, so any LUT file or sampled profile can be audited without this server knowing the format. It checks five invariants the way the lab's metamorphic suite checks engines: lightness monotonicity along the neutral axis (tone reversals), neutral preservation (a gray input gaining chroma beyond 0.02 is a cast), hue stability in Oklab (rotations beyond 25 degrees on colors chromatic enough for hue to mean anything), range discipline (no component escaping [0,1]), and local continuity (an output jump six times larger than the input step between adjacent cells is a tear). Every violation carries its check name, lattice coordinates, a written detail, and a magnitude, with per-check counts in the summary.
What it promises
- Systematic coverage: every lattice cell is tested and the neutral axis is walked end to end, so ok: true means zero violations at the stated thresholds, not a clean sample.
- Findings are localized: each violation names its check, its exact lattice coordinates, and a magnitude, so the offending region of the LUT is one lookup away.
- Format independence by construction: the input is the raw lattice in .cube order, and a lattice that does not match its declared size fails loudly with a DIMENSION error.
Calling it
{
"tool": "audit_color_transform",
"arguments": {
"lattice": "<n^3 x 3 numbers, .cube order>",
"lattice_size": 17
}
} Clone the maryslab repo, run cd mcp && npm install && npm run build, then claude mcp add maryslab -- node mcp/dist/server.js
Known limits
- The thresholds are stated engineering judgments, 0.02 chroma for casts, 25 degrees for hue flips, a six-fold jump factor for tears, defensible defaults rather than perceptual law; a deliberately stylized look can trip them on purpose.
- The audit sees only lattice points: continuity is judged from adjacent-cell jumps, so a defect living strictly between cells of a coarse lattice is invisible, and the verdict describes the lattice you supplied, not the transform at higher resolution.
- Reporting truncates: at most 200 violations are collected and 60 returned, with the per-check summary carrying the counts.