Whole file
facelessuser/coloraide
The author described this change as “Fix white parameter with xy and uv functions”. It counts as a record because the checks below fail on the code as it stood at 9886b23d2 and pass on 7e31912c7, with nothing else changed between the two runs.
Projectfacelessuser/coloraide
Fix saved2026-03-20
Sharing licenceMIT · LICENSE.md
Change size+2 −2
What the code was meant to do, written into the code itself as a save note
Fix white parameter with xy and uv functions
The change
| 794 | 794 | def uv(self, mode: str = '1976', *, white: VectorLike | None = None) -> Vector: | |
| 795 | 795 | """Convert to `xy`.""" | |
| 796 | 796 | ||
| 797 | - | return self.split_chromaticity('uv-' + mode)[:-1] | |
| 797 | + | return self.split_chromaticity('uv-' + mode, white=white)[:-1] | |
| 798 | 798 | ||
| 799 | 799 | def xy(self, *, white: VectorLike | None = None) -> Vector: | |
| 800 | 800 | """Convert to `xy`.""" | |
| 801 | 801 | ||
| 802 | - | return self.split_chromaticity('xy-1931')[:-1] | |
| 802 | + | return self.split_chromaticity('xy-1931', white=white)[:-1] | |
| 803 | 803 | ||
| 804 | 804 | def split_chromaticity( | |
| 805 | 805 | self, |
The check that tells the two apart
fail→pass·tests/test_chromaticity.py::TestChromaticitySpecificCases::test_uv_white
fail→pass·tests/test_chromaticity.py::TestChromaticitySpecificCases::test_xy_white
Check file tests/test_chromaticity.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it9886b23d2fecc57ff1ee26ccb286cb351c92d304
Broken version dated2026-03-19
Modulecoloraide.color
Units changedColor
Fingerprintae515a73fd59d5a9
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in facelessuser/coloraide
- 2026-01-28raytrace_box