uiwjs/react-color

Wheel using HEX instead of HSVA

liztulino opened this issue · 2 comments

I see Colorful can use hex; is there a way we can implement hex with the Wheel component instead of hsva? Really great tools! Thanks.

https://github.com/uiwjs/react-color/blob/main/packages/color-convert/README.md

const { rgb, rgba, hsl, hsv, hsla, hsva } = color('#d1021a');
// rgb   => { b: 26, g: 2, r: 209, }
// rgba  => { b: 26, g: 2, r: 209, a: 1 }
// hsl   => { h: 353.04347826086956, l: 41.37254901960784, s: 98.10426540284361 }
// hsla  => { h: 353.04347826086956, l: 41.37254901960784, s: 98.10426540284361, a: 1 }
// hsv   => { h: 353.04347826086956, s: 99.04306220095694, v: 81.96078431372548 }
// hsva  => { h: 353.04347826086956, s: 99.04306220095694, v: 81.96078431372548, a: 1 }
// hex   => '#d1021a'
// hexa  => '#d1021aff'

You can use @uiw/color-convert to convert HEX to HSVA

@liztulino