Skip to content

Commit

Permalink
Fixing errors in the documentation for colorsynth.sRGB().
Browse files Browse the repository at this point in the history
  • Loading branch information
byrdie committed Nov 16, 2023
1 parent 75af4aa commit fd77382
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions colorsynth/_colorsynth.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ def sRGB(
where_nan = ~np.all(np.isfinite(rgb), axis=axis, keepdims=True)
where_invalid = ~np.all((0 <= rgb) & (rgb <= 1), axis=axis, keepdims=True)
where_outside = where_nan | where_invalid
where_outside = np.broadcast_to(where, rgb.shape)
where_inside = ~where
where_outside = np.broadcast_to(where_outside, rgb.shape)
where_inside = ~where_outside
# Set the pixels outside the gamut to gray
rgb[where_outside] = 0.5
Expand All @@ -467,6 +467,8 @@ def sRGB(
plt.xlabel("CIE 1931 $x$")
plt.ylabel("CIE 1931 $y$")
|
Plot the response curves of the :math:`R`, :math:`G`, and :math:`B` to
a constant spectral power distribution
Expand Down

0 comments on commit fd77382

Please sign in to comment.