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

Fix oklch and oklab colorspace names #300

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

lloydk
Copy link
Collaborator

@lloydk lloydk commented Apr 12, 2023

Change the oklch and oklab colorspace names so they align with the CSS Color Level 4 spec and the original oklab article.

https://www.w3.org/TR/css-color-4/
https://bottosson.github.io/posts/oklab/

Change the oklch and oklab colorspace names so they align
with the CSS Color Level 4 spec and the original oklab article.

https://www.w3.org/TR/css-color-4/
https://bottosson.github.io/posts/oklab/
@facelessuser
Copy link
Collaborator

All of the literature from bottosson seems to indicate the names as Oklab and OkLCh. Is there a plane where this is not the case?

@lloydk
Copy link
Collaborator Author

lloydk commented Apr 12, 2023

All of the literature from bottosson seems to indicate the names as Oklab and OkLCh. Is there a plane where this is not the case?

'Oklab' is what i've changed the oklab colorspace to. I see that in his post about color pickers he did use OkLCh. The CSS color level 4 spec uses Oklch. OkLCh seems to be the one space of the four (Okhsl, Okhsv, Oklab, OkLCh) that doesn't follow the pattern of Uppercase 'O' and lower case for the rest of the letters.

@facelessuser
Copy link
Collaborator

Yes, that has been my observation as well. OkLCh seems to be the standout. Though, it does make sense as LCh is the common casing.

@LeaVerou LeaVerou requested a review from svgeesus April 12, 2023 21:06
@LeaVerou
Copy link
Member

This seems like it may actually be a bug in the CSS specs. @svgeesus what do you think?

@svgeesus
Copy link
Member

Not a bug, this is the relevant issue:

There is a case to be made for a particular capitalization with lowercase h (to represent an angle) ass opposed to uppercase H (to represent a chord length, at that angle, and the mean Chroma, as used in deltaE2000) but remembering to type OkLCh and (CIE) LCh seemed like too much to ask; also note that with this scheme, the 'L" in Oklab becomes uppercase (like CIE Lab) while Björn consistently uses Oklab which is, now, what CSS Color 4 and 5 use, too.

@svgeesus svgeesus merged commit 64430d9 into color-js:main Apr 20, 2023
@lloydk lloydk deleted the fix-colorspace-name branch March 15, 2024 05:26
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.

4 participants