Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Colors shades are rendering incorrectly #11

Open
jxnblk opened this issue Feb 17, 2018 · 2 comments
Open

Colors shades are rendering incorrectly #11

jxnblk opened this issue Feb 17, 2018 · 2 comments

Comments

@jxnblk
Copy link
Owner

jxnblk commented Feb 17, 2018

After one of the recent changes, the returned color arrays are not behaving as expected

@braposo
Copy link

braposo commented Mar 7, 2018

@jxnblk what's up with the arrays? I've been tearing your library apart at work recently so I'm quite familiar with it by now, maybe I can help you?

If you're interested here's my code: https://github.com/braposo/palx/blob/custom-luminance/src/index.js

I've made some changes like:

  • adding the decimal of the base colour instead of always .5 in the luminance calculation so the base colour is always one of the shades.
  • generating the shades for the other hues by first generating the base colour shades from the luminance steps, but then just rotating the hues and locking the saturation and lightness from each of the base shades. I felt it gave us more consistent results than using the luminance again for the other hues. Is that the problem you're seeing?
  • added an extra row of 5 selected shades for each colour but that's really just for us so please ignore that part

The code is quite rough, I've been playing with it in the design team but want to clean it and make it more usable by others in the future.

@guylepage3
Copy link

@braposo did you create a PR for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants