Skip to content

feature:(#305) Add support for oklab and oklch color functions - #436

Merged
Martin Aeschlimann (aeschli) merged 2 commits into
microsoft:mainfrom
rgant:add-css-color-4-oklab-oklch
May 7, 2025
Merged

Martin Aeschlimann (aeschli) merged 2 commits into
microsoft:mainfrom
rgant:add-css-color-4-oklab-oklch

Conversation

@rgant

@rgant J Rob Gant (rgant) commented Apr 24, 2025 •

Copy link
Copy Markdown
Contributor

RESOLVES:
feature - Add new CSS color functions [#305]

DESCRIPTION:
CSS Color Module Level 4 adds support for oklch and oklab to browsers. They are becoming more popular, and I wanted to use them with color previews in my editor.

This feature is built off of the original #306 which included steps for lab and lch but not the ok variants.

Generally this code was designed using real world color examples.

STEPS TO TEST:

Tests were added to relevant files following established patterns. Should be able to just run npm run test. However I don't use vscode, so I did not test in an actual editor.

…ctions

__RESOLVES:__
_feature_ - *Add new CSS color functions* \[[microsoft#305](https://github.com/microsoft/vscode-css-languageservice/issues/305)\]

__DESCRIPTION:__
CSS Color Module Level 4 adds support for `oklch` and `oklab` to browsers. They are becoming more popular, and I wanted to use them with color previews in my editor.

This feature is built of of the original [microsoft#306](microsoft#306) which included steps for `lab` and `lch` but not the `ok` variants.

Generally this code was designed using real world color [examples](https://www.oddcontrast.com/#hex__*f00__*4d216f80__srgb).

__STEPS TO TEST:__
@rgant

Copy link
Copy Markdown
Contributor Author

Any questions or concerns? Anything I can do to help move this along?

@aeschli

Copy link
Copy Markdown
Collaborator

J Rob Gant (@rgant) Looks good, thanks a lot!

@vs-code-engineering vs-code-engineering Bot added this to the May 2025 milestone May 7, 2025
Comment thread src/languageFacts/colors.ts Resolved
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.

3 participants