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

Commit

Permalink
Guess it helps if I actually include the clamped RGB function.
Browse files Browse the repository at this point in the history
  • Loading branch information
gtaylor committed May 19, 2014
1 parent fffd0a5 commit bc7e0b7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion colormath/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '2.0.1'
VERSION = '2.0.2'
5 changes: 5 additions & 0 deletions colormath/color_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ def _clamp_rgb_coordinate(self, coord):
:returns: The clamped value.
"""

if not self.is_upscaled:
return min(max(coord, 0.0), 1.0)
else:
return min(max(coord, 1), 255)

@property
def clamped_rgb_r(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion doc_src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# The short X.Y version.
version = '2.0'
# The full version, including alpha/beta/rc tags.
release = '2.0.1'
release = '2.0.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
9 changes: 9 additions & 0 deletions doc_src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
Release Notes
=============

2.0.2
-----

Bug Fixes
^^^^^^^^^

* Apparently I didn't add the function body for the clamped RGB properties.
Yikes.

2.0.1
-----

Expand Down

0 comments on commit bc7e0b7

Please sign in to comment.