From edd52ffeedff36658f9ee49e0b774bd2e36b0d92 Mon Sep 17 00:00:00 2001 From: Yusur Princeps Date: Fri, 9 Jan 2026 10:56:46 +0100 Subject: [PATCH] 0.12.0a10 fixed rgb -> oklch color converter --- src/suou/__init__.py | 2 +- src/suou/color.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/suou/__init__.py b/src/suou/__init__.py index c97f8fb..a47775a 100644 --- a/src/suou/__init__.py +++ b/src/suou/__init__.py @@ -38,7 +38,7 @@ from .http import WantsContentType from .color import OKLabColor, chalk, WebColor, RGBColor, LinearRGBColor, XYZColor, OKLabColor from .mat import Matrix -__version__ = "0.12.0a9" +__version__ = "0.12.0a10" __all__ = ( 'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue', diff --git a/src/suou/color.py b/src/suou/color.py index 07748ae..cbbf2d0 100644 --- a/src/suou/color.py +++ b/src/suou/color.py @@ -150,8 +150,8 @@ class RGBColor(namedtuple('_WebColor', 'red green blue')): *New in 0.12.0* """ return LinearRGBColor(*( - (i / 12.92 if abs(i / 255) <= 0.04045 else - (-1 if i < 0 else 1) * (((abs(i / 255) + 0.55)) / 1.055) ** 2.4) for i in self + ((i / 255) / 12.92 if abs(i / 255) <= 0.04045 else + (-1 if i < 0 else 1) * (((abs(i / 255) + 0.055)) / 1.055) ** 2.4) for i in self )) def to_oklab(self):