Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit bc7e0b7

Browse files
committed
Guess it helps if I actually include the clamped RGB function.
1 parent fffd0a5 commit bc7e0b7

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

colormath/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '2.0.1'
1+
VERSION = '2.0.2'

colormath/color_objects.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,11 @@ def _clamp_rgb_coordinate(self, coord):
552552
:returns: The clamped value.
553553
"""
554554

555+
if not self.is_upscaled:
556+
return min(max(coord, 0.0), 1.0)
557+
else:
558+
return min(max(coord, 1), 255)
559+
555560
@property
556561
def clamped_rgb_r(self):
557562
"""

doc_src/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# The short X.Y version.
5959
version = '2.0'
6060
# The full version, including alpha/beta/rc tags.
61-
release = '2.0.1'
61+
release = '2.0.2'
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.

doc_src/release_notes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
Release Notes
66
=============
77

8+
2.0.2
9+
-----
10+
11+
Bug Fixes
12+
^^^^^^^^^
13+
14+
* Apparently I didn't add the function body for the clamped RGB properties.
15+
Yikes.
16+
817
2.0.1
918
-----
1019

0 commit comments

Comments
 (0)