From 4e1f75456b7093986ad0b6f763910439c3936ade Mon Sep 17 00:00:00 2001 From: martin veillette Date: Fri, 4 Sep 2026 22:22:38 -0400 Subject: [PATCH] docs: document hardcoded colors compliance carve-out Use the phrase the Baton compliance checker matches so documented physics overlays are not reported as WARN. Co-authored-by: Cursor --- CLAUDE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index dc7b346..3a7d6c2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -87,10 +87,10 @@ micrometer, mirror tilt) only reach their useful precision via shift-arrow. ## Compliance carve-outs -- **`src/common/view/spectralColor.ts` and `sourceColor.ts` construct colours in code.** The - compliance grep flags `new Color(...)` and `encodeSrgb(...)` as possible hardcoded colours. - They are not theme colours — they are the output of a wavelength-to-colour computation, which - is physics, not styling. Every *themeable* colour lives in `InterferometryLabColors.ts`. +- **Hardcoded colors:** `src/common/view/spectralColor.ts` and `sourceColor.ts` construct colours in + code. The compliance grep flags `new Color(...)` and `encodeSrgb(...)` as possible hardcoded + colors. They are not theme colours — they are the output of a wavelength-to-colour computation, + which is physics, not styling. Every *themeable* colour lives in `InterferometryLabColors.ts`. `scenery-phet`'s `VisibleColor` is deliberately not used for anything that gets summed, for the reasons in the implementation notes. - **`tests/memory-leak.test.ts` diverges from the template**: its `forceGC()` takes a predicate