Skip to content

Commit

Permalink
Add EPSILON to primaries in colour_visuals.VisualRGBColourspace2D
Browse files Browse the repository at this point in the history
… class to avoid singularities.
  • Loading branch information
KelSolaar authored Apr 22, 2024
1 parent eeb9923 commit 8e7afb7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions colour_visuals/rgb_colourspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@ def update(self):
XYZ_to_ij = METHODS_CHROMATICITY_DIAGRAM[self._method]["XYZ_to_ij"]

ij = XYZ_to_ij(
xy_to_XYZ(self._colourspace.primaries),
xy_to_XYZ(self._colourspace.primaries + EPSILON),
plotting_colourspace.whitepoint,
)
ij[np.isnan(ij)] = 0

positions = append_channel(
np.array([ij[0], ij[1], ij[1], ij[2], ij[2], ij[0]]), 0
Expand Down

0 comments on commit 8e7afb7

Please sign in to comment.