Skip to content

Commit

Permalink
Clip the output of colorsynth.rgb() to lie between 0 and 1. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrdie authored Jul 21, 2024
1 parent 0be9bc5 commit 6d20ca2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions colorsynth/_colorsynth.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ def rgb(
)

RGB = RGB.to_value(u.dimensionless_unscaled)
RGB = np.clip(RGB, 0, 1)

return RGB

Expand Down

0 comments on commit 6d20ca2

Please sign in to comment.