uiwjs / react-color

🎨 Is a tiny color picker widget component for React apps.
https://uiwjs.github.io/react-color
MIT License
274 stars 92 forks source link

Wheel cursor disabled #149

Closed NerdPraise closed 3 months ago

NerdPraise commented 3 months ago

What happens: For the wheel component, if the color is set to '#000000', then the cursor is immovable

What should happen: The cursor should be able to move round the wheel and maybe capture all essence of black

jaywcjlove commented 3 months ago

@NerdPraise Using hsva values will not cause this issue.

<Wheel color={{a: 1, h: 214, s: 0, v: 40}} />
<Wheel color={{a: 1, h: 214, s: 0, v: 40}} width={100} height={100} />

https://github.com/uiwjs/react-color/blob/71617b3621f22c097cf34a2870009ff005ee7a5b/packages/color-convert/src/index.ts#L273-L274

https://github.com/uiwjs/react-color/blob/71617b3621f22c097cf34a2870009ff005ee7a5b/packages/color-convert/src/index.ts#L191

NerdPraise commented 3 months ago

Oh I see there is a hextoHsva utility function. Thank you so much. I would closed the issue Appreciate the good work