diff --git a/coloraide/spaces/din99o.py b/coloraide/spaces/din99o.py index 8b09dd478..11354954c 100644 --- a/coloraide/spaces/din99o.py +++ b/coloraide/spaces/din99o.py @@ -39,8 +39,8 @@ def lab_to_din99o(lab: Vector) -> Vector: """XYZ to DIN99o.""" l, a, b = lab - val = 1 + abs(C2 * l) - l99o = C1 * math.copysign(1, l) * math.log(val) / KE + val = 1 + C2 * l + l99o = C1 * math.log(val) / KE if val >= 0 else math.nan if a == 0 and b == 0: a99o = b99o = 0.0 diff --git a/docs/src/markdown/about/changelog.md b/docs/src/markdown/about/changelog.md index e6a507369..a75100f76 100644 --- a/docs/src/markdown/about/changelog.md +++ b/docs/src/markdown/about/changelog.md @@ -8,6 +8,7 @@ - **FIX**: Much more accurate ICtCp matrices. - **FIX**: Fix typing of deeply nested arrays in `algebra`. - **FIX**: Fix issue with HCT undefined channel resolver. +- **FIX**: Proper handling of negative lightness for DIN99o. ## 2.13.1