casesandberg/react-color

SliderPicker display issue when managing color state as hex or rgb

Open

#502 opened on Apr 19, 2018

View on GitHub
 (3 comments) (1 reaction) (0 assignees)JavaScript (11,679 stars) (946 forks)batch import
bughelp wanted

Description

Hi,

Thanks for your hard work on this library. It is incredibly useful. I am using the SliderPicker component and have a minor issue with the 'shade buttons' that appears below the slider. The darkest shade button will never show as selected when clicked, but the 4 lighter shades displayed as selected just fine. I was a little stumped because your example page shows it working fine, until I looked at your source and realized the state for your SliderPicker was managed as hsl and not hex or rgb. After switching to my color state to be hsl the darkest shade shows selected as expected.

To clarify, by 'selected' I mean when the shade button is clicked it has the scale(1.8) applied to it so that it increases in size compared to the rest of the shades.

Contributor guide