Color Spaces for mixing colors - #1132
Open
DevCharly wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Oklab and linear sRGB color spaces to color functions
mix(),tint()andshade(). (issue #1109)It also adds preview for color functions to FlatLaf Theme Editor.
Color Spaces
To use Oklab or linear sRGB color spaces in color functions
mix(),tint()andshade(),pass
oklaborlrgbas last parameter:Following screenshot shows some differences between the color spaces:
Color Function Preview in FlatLaf Theme Editor
If the editor cursor is at a color function, a preview of the result and the whole percentage range is shown at the bottom of the "Preview" area. This makes it easier to choose a good percentage value and color space.
The color function is shown at top.
Then the initial color and the resulting color (with percentage).
The bottom gradient shows the color function result in range from 0% to 100%.