Skip to content

Conversation

limzykenneth
Copy link
Member

Resolves #7998

Changes:

The utility functions didn't take into account the current maxes of the relevant color modes, this implements it. One particular caveat is that hue() applies to HSB, HSL but also LCH and OKLCH which also have hue values. This may or may not be desired but for consistency sake they are included.

PR Checklist

// p5._validateParameters('saturation', arguments);
return this.color(c)._getSaturation();
const colorMode = (
this._renderer.states.colorMode === HSB ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor/optional: isn't this the same as (this._renderer.states.colorMode === HSB) ? HSB : HSL? that seems a little more readable.

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.

2 participants