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

Update lch() #33007

Merged
merged 11 commits into from
Apr 11, 2024
Merged

Update lch() #33007

merged 11 commits into from
Apr 11, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented Apr 9, 2024

The L in LCH is different from the L in HSL - it's the brightness. I didn't go into detail, because it's beyond the scope, but that explains the edits to L.

Otherwise, i added a few examples, including one that demonstrates the hue values.

@estelle estelle requested a review from a team as a code owner April 9, 2024 03:36
@estelle estelle requested review from dipikabh and removed request for a team April 9, 2024 03:36
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed labels Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Preview URLs

(comment last updated: 2024-04-11 22:22:08)

@dipikabh dipikabh self-assigned this Apr 9, 2024
dipikabh

This comment was marked as resolved.

Copy link
Member Author

@estelle estelle left a comment

Choose a reason for hiding this comment

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

@dipikabh Thanks for the review. I captured almost all your suggestions. I am leaving the example title as "hues in LCH". It's more about learning hues that adjusting hues, and there are now two links to it as an explanation for hues in lch.

@estelle estelle requested a review from dipikabh April 10, 2024 21:57
Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, @estelle. They look good.

Do we want to change "lightness" to "brightness"? I've added couple of suggestions to the newly added text.

- `C`
- : A {{CSSXref("<number>")}}, a {{CSSXref("<percentage>")}}, or the keyword `none` (equivalent to `0%` in this case). This value is a measure of the color's chroma (roughly representing the "amount of color"). Its minimum useful value is `0%`, or `0`, while its maximum is theoretically unbounded (but in practice does not exceed `230`), with `100%` being equivalent to `150`.
- `H`

- : A {{CSSXref("<number>")}}, an {{CSSXref("<angle>")}}, or the keyword `none` (equivalent to `0deg` in this case) representing the color's {{CSSXref("<hue>")}} angle.
- : A {{CSSXref("<number>")}}, an {{CSSXref("<angle>")}}, or the keyword `none` (equivalent to [`0deg`, or magenta](#result_3)) representing the color's {{CSSXref("<hue>")}} angle.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should link to the example here. The mention of "magenta" can be confusing. The example can explain none or 0deg.

Suggested change
- : A {{CSSXref("<number>")}}, an {{CSSXref("<angle>")}}, or the keyword `none` (equivalent to [`0deg`, or magenta](#result_3)) representing the color's {{CSSXref("<hue>")}} angle.
- : A {{CSSXref("<number>")}}, an {{CSSXref("<angle>")}}, or the keyword `none` (equivalent to `0deg`) representing the color's {{CSSXref("<hue>")}} angle.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the color and link based on #33007 (comment). Let's keep the link but remove "magenta"

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not in favor of adding a link to the example section without indicating that the link destination is on the same page. Clicking on the link might cause a reader to lose their current context and they'll have to scroll back to find their previous location. Other links in the vicinity take readers to different pages, and without a hint, this link could confuse readers by unexpectedly navigating them to a place within an example's result.

files/en-us/web/css/color_value/lch/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/color_value/lch/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/color_value/lch/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/color_value/lch/index.md Outdated Show resolved Hide resolved
@estelle estelle requested a review from dipikabh April 11, 2024 19:45
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@estelle
Copy link
Member Author

estelle commented Apr 11, 2024

@dipikabh Please note that I add a "note" under "L" lightness in values. This is new since your the last review.


- : A {{CSSXref("&lt;number&gt;")}} between `0` and `100`, a {{CSSXref("&lt;percentage&gt;")}} between `0%` and `100%`, or the keyword `none` (equivalent to `0%`). The number `0` corresponds to `0%` (black), and the number `100` corresponds to `100%` (white). This value specifies the color's brightness in the [CIELab color space](/en-US/docs/Glossary/Color_space#cielab_color_spaces).

> **Note:** The `L` is the perceived lightness, meaning the visually perceived lightness we see with our eyes, or "brightness", rather than the `L` in `hsl()`, which is the lightness as compared to other colors.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for adding this note!!

is this what we want to say:

Suggested change
> **Note:** The `L` is the perceived lightness, meaning the visually perceived lightness we see with our eyes, or "brightness", rather than the `L` in `hsl()`, which is the lightness as compared to other colors.
> **Note:** The `L` in `lch()` is the perceived lightness, which refers to the "brightness" we visually perceive with our eyes. This is different from the `L` in `hsl()`, where it represents lightness as compared to other colors.

- `C`
- : A {{CSSXref("&lt;number&gt;")}}, a {{CSSXref("&lt;percentage&gt;")}}, or the keyword `none` (equivalent to `0%` in this case). This value is a measure of the color's chroma (roughly representing the "amount of color"). Its minimum useful value is `0%`, or `0`, while its maximum is theoretically unbounded (but in practice does not exceed `230`), with `100%` being equivalent to `150`.
- `H`

- : A {{CSSXref("&lt;number&gt;")}}, an {{CSSXref("&lt;angle&gt;")}}, or the keyword `none` (equivalent to `0deg` in this case) representing the color's {{CSSXref("&lt;hue&gt;")}} angle.
- : A {{CSSXref("&lt;number&gt;")}}, an {{CSSXref("&lt;angle&gt;")}}, or the keyword `none` (equivalent to [`0deg`, or magenta](#result_3)) representing the color's {{CSSXref("&lt;hue&gt;")}} angle.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not in favor of adding a link to the example section without indicating that the link destination is on the same page. Clicking on the link might cause a reader to lose their current context and they'll have to scroll back to find their previous location. Other links in the vicinity take readers to different pages, and without a hint, this link could confuse readers by unexpectedly navigating them to a place within an example's result.

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks, @estelle! Just two last comments, one is an edit for the new note.
Leaving a +1 so you can merge after making the changes you see fit. Thank you!

estelle and others added 2 commits April 11, 2024 15:19
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@estelle estelle merged commit 94be15a into mdn:main Apr 11, 2024
7 of 8 checks passed
@estelle estelle mentioned this pull request Apr 11, 2024
@estelle estelle deleted the ct9 branch April 22, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants