0.12.0a10 fixed rgb -> oklch color converter
This commit is contained in:
parent
fb245f7d12
commit
edd52ffeed
2 changed files with 3 additions and 3 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue