casesandberg / react-color

:art: Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more
http://casesandberg.github.io/react-color/
MIT License
12.05k stars 922 forks source link

Hex8 #875

Open byTimo opened 2 years ago

byTimo commented 2 years ago

The ColorPicker parses 8-digits hex correclty, but onChange is always received the hex value in 6-digit format. How can I use the value in hex with opactiy?

avoskresensky commented 1 year ago

+1 on hex8 support.

Apparently this block is to blame: https://github.com/casesandberg/react-color/blob/master/src/helpers/color.js#L51

MelanieW97 commented 1 year ago

+1

messi0087 commented 2 months ago

+1

messi0087 commented 2 months ago

i find a way fix this, use patch-package to fix。

Apparently this block is to blame: https://github.com/casesandberg/react-color/blob/master/src/helpers/color.js#L51

messi0087 commented 1 month ago

i find other way to fix this issues

<div
          onInput={(event) => {
            const target = event?.target as HTMLInputElement;
            const value = target?.value;
            console.log(value)
          }}
        >
          <SketchPicker
            presetColors={[]}
            onChange={(value) => {
          />
        </div>