Skip to content

Implement gamut mapping#165

Merged
danburzo merged 31 commits intomainfrom
gamut-map
Mar 25, 2023
Merged

Implement gamut mapping#165
danburzo merged 31 commits intomainfrom
gamut-map

Conversation

@danburzo
Copy link
Collaborator

Adds the following methods (names subject to change):

  • inGamut(space) — check that the color is in the gamut of space; fixes Add P3 support to displayable #161.
  • toGamut(space) — get the closest color that's in gamut for space, based on css-color-4 gamut mapping algo
  • clampGamut(space) — like clampRgb() but for any RGB space.

@danburzo danburzo merged commit 09915b8 into main Mar 25, 2023
@danburzo danburzo deleted the gamut-map branch March 25, 2023 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add P3 support to displayable

1 participant