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.

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

794794 def uv(self, mode: str = '1976', *, white: VectorLike | None = None) -> Vector:
795795 """Convert to `xy`."""
796796
797- return self.split_chromaticity('uv-' + mode)[:-1]
797+ return self.split_chromaticity('uv-' + mode, white=white)[:-1]
798798
799799 def xy(self, *, white: VectorLike | None = None) -> Vector:
800800 """Convert to `xy`."""
801801
802- return self.split_chromaticity('xy-1931')[:-1]
802+ return self.split_chromaticity('xy-1931', white=white)[:-1]
803803
804804 def split_chromaticity(
805805 self,

The check that tells the two apart

failpass·tests/test_chromaticity.py::TestChromaticitySpecificCases::test_uv_white
failpass·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