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

oklch typo in note #36669

Closed
magicdawn opened this issue Nov 6, 2024 · 2 comments · Fixed by #36682
Closed

oklch typo in note #36669

magicdawn opened this issue Nov 6, 2024 · 2 comments · Fixed by #36682
Assignees
Labels
Content:CSS Cascading Style Sheets docs

Comments

@magicdawn
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch

What specific section or headline is this issue about?

Values

What information was incorrect, unhelpful, or incomplete?

image

What did you expect to see?

  • we can define lightness with number 0-1 oklch(0.1 0 0)
  • we can define lightness with percentage 0%-100% oklch(10% 0 0)
  • when used in relative colors: l is a number (0-1 inclusive)

so I don't understand where the note means Here 100% is equal to the number 100 for the L value and 0.4 for the C value. ?


and I have tested the L value

image
image

image
image


So I believe this note is obselete and should be removed. and add to hsl since relative hsl 100 is equivalent to 100%. https://drafts.csswg.org/css-color-5/#relative-HSL

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@magicdawn magicdawn added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 6, 2024
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Nov 6, 2024
@Josh-Cena
Copy link
Member

This was just added in #33048, so I don't think it's obsolete, likely just a misunderstanding. @estelle?

@Josh-Cena Josh-Cena removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 6, 2024
@estelle
Copy link
Member

estelle commented Nov 6, 2024

The note was incorrect.

L is a <number> that corresponds to the Lightness; 1.0 is equivalent to 100%.

C is a <number> that corresponds to the chroma. 0.4 is equivalent to 100%.

H is a <number> that corresponds to the hue, in degrees, normalized to a [0, 360] range. 90 is equivalent to 90deg.

alpha is a <number> that corresponds to the alpha transparency. 1.0 is equivalent to 100%.

Fixed in #36682

@estelle estelle self-assigned this Nov 8, 2024
@estelle estelle changed the title the Here 100% is equal to the number 100 for the L value and 0.4 for the C value. NOTE is confusing oklch typo in note Nov 8, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants