chromatic-python 0.3.3__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chromatic/__init__.pyi +1 -1
- chromatic/_version.py +2 -2
- chromatic/color/colorconv.py +4 -2
- chromatic/color/core.py +440 -445
- chromatic/color/core.pyi +34 -24
- chromatic/color/palette.py +69 -63
- chromatic/color/palette.pyi +2 -4
- chromatic/data/userfont.py +17 -2
- chromatic/demo.py +79 -135
- chromatic/image/__init__.py +2 -2
- chromatic/image/__init__.pyi +1 -1
- chromatic/image/_array.py +15 -15
- {chromatic_python-0.3.3.dist-info → chromatic_python-0.4.0.dist-info}/METADATA +66 -44
- {chromatic_python-0.3.3.dist-info → chromatic_python-0.4.0.dist-info}/RECORD +18 -18
- /chromatic/image/{_glyph_proc.py → _glyph.py} +0 -0
- {chromatic_python-0.3.3.dist-info → chromatic_python-0.4.0.dist-info}/WHEEL +0 -0
- {chromatic_python-0.3.3.dist-info → chromatic_python-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {chromatic_python-0.3.3.dist-info → chromatic_python-0.4.0.dist-info}/top_level.txt +0 -0
chromatic/__init__.pyi
CHANGED
chromatic/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.4.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 4, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
chromatic/color/colorconv.py
CHANGED
|
@@ -59,7 +59,7 @@ def is_u24(value, *, strict: bool = False):
|
|
|
59
59
|
ValueError
|
|
60
60
|
Raised when `strict=True` and value is not u24
|
|
61
61
|
"""
|
|
62
|
-
if _supports_int(
|
|
62
|
+
if _supports_int(value.__class__):
|
|
63
63
|
if 0 <= int(value) <= 0xFFFFFF:
|
|
64
64
|
return True
|
|
65
65
|
elif not strict:
|
|
@@ -92,7 +92,9 @@ def int2rgb(__x: int) -> Int3Tuple:
|
|
|
92
92
|
try:
|
|
93
93
|
return getattr(__x, 'rgb')
|
|
94
94
|
except AttributeError:
|
|
95
|
-
|
|
95
|
+
pass
|
|
96
|
+
x = int(__x) & 0xFFFFFF
|
|
97
|
+
return (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF
|
|
96
98
|
|
|
97
99
|
|
|
98
100
|
def xyz2lab(xyz: FloatSequence) -> Float3Tuple:
|