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 CHANGED
@@ -87,4 +87,4 @@ from .image import (
87
87
  reshape_ansi,
88
88
  to_sgr_array,
89
89
  )
90
- from .image._glyph_proc import get_glyph_masks, sort_glyphs, ttf_extract_codepoints
90
+ from .image._glyph import get_glyph_masks, sort_glyphs, ttf_extract_codepoints
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.3.3'
32
- __version_tuple__ = version_tuple = (0, 3, 3)
31
+ __version__ = version = '0.4.0'
32
+ __version_tuple__ = version_tuple = (0, 4, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -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(type(value)):
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
- return (__x >> 16) & 0xFF, (__x >> 8) & 0xFF, __x & 0xFF
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: