PR_26177_004-shared-color-foundation#212
Conversation
There was a problem hiding this comment.
💡 Codex Review
When hslToRgb is fed the output of rgbToHsl, any saturation or lightness between 0 and 1 percent is reinterpreted here as a 0..1 unit fraction instead of a percent. For example, rgbToHsl({ r: 128, g: 127, b: 127 }) returns s: 0.392157, but this helper converts that to ~39% saturation, so the round trip becomes a saturated red ({ r: 178, g: 77, b: 77 }) instead of the original near-gray. Dark colors with l < 1 have the same problem, so the RGB/HSL conversion is not reliable for low-saturation or very dark inputs.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
PR_26177_004-shared-color-foundation
Date: 2026-06-26
Scope: Shared color foundation
Status: PASS
Summary
src/shared/color/color.js.tests/shared/ColorFoundation.test.mjs.Validation
node ./scripts/run-node-test-files.mjs tests/shared/ColorFoundation.test.mjs.node --check src/shared/color/color.js.node --check tests/shared/ColorFoundation.test.mjs.git diff --check.Artifact
tmp/PR_26177_004-shared-color-foundation_delta.zip