Skip to content

Colour: save source-aligned Lab fields, palettes and distance measurements - #243

Draft
adarshh347 wants to merge 5 commits into
mainfrom
feat/perceptual-core-colour
Draft

adarshh347 wants to merge 5 commits into
mainfrom
feat/perceptual-core-colour

Conversation

@adarshh347

Copy link
Copy Markdown
Owner

What changes

The Colour slot now produces source-aligned, portable working-sRGB and CIELAB channels, a deterministic sampled palette with full membership and disclosed counts/locations, and saved CIELAB ΔE76 distance fields from an explicit pixel or supplied sRGB colour. The existing Lab route displays these records with source-linked probes, path/ROI profiles, fixed-scale comparison and display-only controls. Reopen and export/import reuse the saved measurements without a model. Original source bytes/digests remain authoritative; absent/unsupported profiles are stated as assumptions, not calibrated pigment measurements.

This PR changes only Colour-owned family, contract and test paths. It leaves legacy warmth/chroma services and shared Lab plumbing unchanged. No new dependency or learned model is needed.

Validation

  • 78 focused backend tests passed, including numeric Lab patches, grey/ramp/invalid/non-square and ICC/EXIF cases, legacy colour compatibility, deterministic palette caps, and export/import consumption in a fresh session.
  • Four Colour frontend tests, family ESLint, Vite build, family contract check and shared schema drift check passed.
  • Painting and ordinary-photo rehearsals saved, reopened, exported and imported fields. The painting's 387×257×6 field retained measurement hash sha256:b1cd10cec94d9ede939675a6df2fab1907b8fdc9aacf57ce24ca310257350737 after import. Browser probes matched raw saved numbers. Canonical writes and model calls: zero. The photo control is people/fabric, not the requested household desk/object control.
  • Full backend: 6,301 passed, 12 skipped, 7 failed. Five failures are shared tests hard-coding only Extent/Topology as enabled; two unrelated inquiry tests expect unavailable SAM 3 weights on this machine. Full Lab frontend: 989 passed, 6 failed, all hard-code two live/six disabled families.

Shared integration requests for A/H

  • Update central registry/catalogue/parity assertions for an enabled Colour slot and revise the central colour/material question.
  • The bounded generic prompt show the colour field works. The generic rules planner cannot pass an explicitly selected pixel into compare colour to the selected sample, so that prompt refuses even after a panel selection; the family panel performs the direct operation and asks for a missing reference. A/H needs a validated selected-pixel resolver seam.
  • Reconcile the shared reopen source/arm refresh and generic inspector's 0–1 default for Lab/distance/cluster fields. The Colour panel has local display fallbacks.
  • Complete household desk/object and light/narrow browser review at the human gate.

Private finding: Findings/FINDING-perceptual-core-001B-colour-2026-09-23.md in the author's unversioned vault. Human status: AWAITING_HUMAN.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant