-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add interpolation support for OkLrCH #505
Comments
In my case I'm doing more than just varying luminance. A big part of designing colors for pixel art is also varying hue and saturation/chroma. The goal of this project is to provide a sandbox for mixing and interpolating colors across a variety of colorspaces and channels on a 2D grid. LAB/LCH has some weaknesses here where the hue doesn't stay consistent, while OkLCH produces a better result. I have considered writing my own function to handle interpolation, particularly mapping L to Lr and back via |
True, but it would be useful to add it as an option; we have so many now. We should also add some guidance to the start of "supported color space" because it has now become a bit overwhelming to people just getting started. |
It's easy enough to add the space, but are we wanting to add both the Oklab and OkLCH space with this adjusted lightness? |
That would seem logical (I increasingly see the a,b spaces as just an intermediate stage to the polar ones) |
Resolves color-js#505
PR is up |
Resolves color-js#505
Resolves color-js#505
Hi, I am working on an app to generate shades of colors for game artwork. During development I noticed that when using
steps()
to lerp over OkLCH, the result is too dark at lower luminance:It looks like I'm not the only one who noticed this issue.
It would be nice if OkLrCH were an option for interpolation, as I want to generate shades of color with roughly linear perceptual luminance, and the Lr function mentioned here seems to give results close to that of LAB. The code for the function already seems to be in the library via the OkHSL colorspace. Would it be possible to repurpose this as OkLrCH for better luminance transitions in OkLCH?
The text was updated successfully, but these errors were encountered: