Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Gray-scale in colorMode() #7690

Merged
merged 5 commits into from
Apr 8, 2025
Merged

Conversation

perminder-17
Copy link
Contributor

No description provided.

* <a href="#/p5.Color">p5.Color</a> objects remember the mode that they were
* created in. Changing modes doesn't affect their appearance.
*
* `Single-value (Grayscale) Colors` :

Choose a reason for hiding this comment

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

The colon in "Single-value (Grayscale) Colors :" has an extra space before it. small thing but wanted to check for concistency.

Comment on lines 1115 to 1122
* @example
* <div>
* <code>
*
* // Example: Single-value (Grayscale) colors in different color modes.
* // Each rectangle is filled with one parameter, but its final color depends
* // on how that parameter is interpreted by the current color mode.
*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @limzykenneth can you look at this sketch? can we keep this one or should I change it?

Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking whether to include LAB and HWB instead of the other color spaces, as although LAB and HWB may potentially be the most confusing to work with and can benefit from examples, it may be counter productive to include it here because of the same reason with grayscale usage possibly something that people actively choosing LAB or HWB color space would not be aiming to do.

Eg. For Lab color space, LCH is much easier to use while the lightness value (L) works the same for both. While for HWB, the benefit is to be able to choose a hue and adjust its brightness and darkness with two separate handle like mixing color directly, as opposed to thinking about saturation then brightness/lightness which can be less intuitive, as such it can be reasoned that grayscale for HWB is more of an edge case.

@perminder-17
Copy link
Contributor Author

Hi @limzykenneth I removed Lab and hwb, let me know if still there's any changes required.

@perminder-17 perminder-17 requested a review from Copilot April 7, 2025 12:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/color/setting.js:793

  • There is a missing space between 'the' and the backtick before 'whiteness (W)'. Please add a space for clarity.
*   * - `HWB`: Grayscale relies on both the` whiteness (W)` and `blackness (B)` channels.

@ksen0 ksen0 merged commit e538e51 into processing:dev-2.0 Apr 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants