Skip to content

Commit 20abd71

Browse files
authored
Upgrade to ColorAide 2.4 (#250)
1 parent 663106b commit 20abd71

File tree

18 files changed

+3069
-44
lines changed

18 files changed

+3069
-44
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
configurable. Use clipping by default to match browsers as this is
88
likely what people expect even if it is not an ideal approach. Use
99
`gamut_map` in settings option to manually control the approach.
10-
- **NEW**: Upgrade ColorAide to 2.3.
10+
- **NEW**: Upgrade ColorAide to 2.4.
1111
- **FIX**: Fix regression where contrast logic could not adjust to a
1212
given contrast due to a property access.
1313

lib/coloraide/__meta__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,5 @@ def parse_version(ver: str) -> Version:
192192
return Version(major, minor, micro, release, pre, post, dev)
193193

194194

195-
__version_info__ = Version(2, 3, 0, "final")
195+
__version_info__ = Version(2, 4, 0, "final")
196196
__version__ = __version_info__._get_canonical()

lib/coloraide/algebra.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def round_to(f: float, p: int = 0) -> float:
111111
elif p == 0:
112112
return round_half_up(f)
113113

114+
# Ignore infinity
115+
elif math.isinf(f):
116+
return f
117+
114118
# Round to the specified precision
115119
else:
116120
whole = int(f)

lib/coloraide/cmfs.py

Lines changed: 1845 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)