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

REwork of global color & scales #103

Open
oppenheimer- opened this issue Oct 5, 2021 · 2 comments
Open

REwork of global color & scales #103

oppenheimer- opened this issue Oct 5, 2021 · 2 comments
Labels
Discussion Community opinion is needed

Comments

@oppenheimer-
Copy link

When defining custom global colors, the UX suffers a lot when trying to build a custom scheme, where the colors do not depend on a scale.

For example:

  1. we define a base color, the scales are calculated automatically
  2. set custom HSL values for different shades
  3. change the base color
  4. all changes in 2. are lost

On the other hand it would be extremely beneficial for the color editor to support a custom lower and upper value and calculate everything in between is calculated with real HSL.

  1. set base color
  2. set lower color
  3. set upper color
  4. lighter / darker values are calculated

This brings me to another point: better color calculations. I'd like to recommend integrating the famous "chroma.js" library.
Please have a look at their color scale implementation; especially the HSL mode differs perceptually alot from linear blending like now.

Changing the editor to support more or even less color variations would be very very handy, too. Custom naming would be necessary, too then.

@sebastiano-guerriero
Copy link
Contributor

Hi!

I can see why point 1 can be an issue. Right now the color editor automatically updates all the color variations when the base color is changed. We couldn't figure out a way to 'lock' one among hue/saturation/lightness (which one should we 'lock'? when locking doesn't make sense?).

About point 2: We're already using chroma.js to generate the background + color contrasts. For all the other colors, we're generating the color variations by updating the lightness. I agree that lightness is not the only factor to consider when creating a color scale. For this reason, we make hue and saturation manually editable. The advantage I see in the way it works now: you can pick a single color instead of 3. Selecting 3 colors would require extra work for the user.

Thanks for the feedback. We'll certainly look into improving the color editor soon 👍

@sebastiano-guerriero sebastiano-guerriero added the Discussion Community opinion is needed label Oct 28, 2021
@oppenheimer-
Copy link
Author

For this reason, we make hue and saturation manually editable.

And that was basically my pain point, too. The generated color scale, that should take the heavy lifting from you, oftentimes seems a bit off so we need to adjust HSL manually nonetheless. This became tedious for all the new themes i was setting up in the last year.

Something different though:
an overhaul of the color editor would be absolutely sweet. I stumbled upon this awesome ai palette generator (api included). Maybe this is of interest to you in some way: huemint. Already spun my head around using this for a home grown color editor here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Community opinion is needed
Projects
None yet
Development

No branches or pull requests

2 participants