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

Perceptual color #453

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Perceptual color #453

wants to merge 3 commits into from

Conversation

Javyre
Copy link

@Javyre Javyre commented Oct 6, 2024

Hey, just did this mostly for fun but it would be useful to have the colour transforms be perceptually monotonic.

The rationale here is that the Color lib is essentially used as a colour picker for colorscheme tweaking/creating, so the improvements described here, here and here are relevant.

What I did so far:

Issues:

  • This pr currently is a breaking change as the behaviour of the existing transforms have changed.
    • We can just accept this as a breaking change or Maybe we can add an opt-in field in the setup()?
      I'll leave it up to you to say how much breakage you feel comfortable with allowing and how.
  • Also currently breaking as it slightly changes the output of the tranform-based colours in the foxes' palettes.
    • What I suggest here is to just use absolute colours in the palettes wherever we care about colour stability.

Let me know if this is interesting to you. I did this mostly for fun and users who are interested could totally just copy the oklab lib I ported and use it in their overrides so this is not even necessarily worth merging.

(also thanks for a great extensible plugin and codebase!)

Javyre added 3 commits October 5, 2024 16:13
The advantage of this change is that regular increments in arguments to
the tranforms now produce visually regular increments to the human eye
in the resulting colors.

This is a breaking change as the meaning of the old transformation
parameters no longer correspond to the same results.
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.

1 participant