Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8 digit hex codes #416

Open
davvidbaker opened this issue Sep 6, 2017 · 3 comments
Open

8 digit hex codes #416

davvidbaker opened this issue Sep 6, 2017 · 3 comments
Milestone

Comments

@davvidbaker
Copy link

Hey awesome thing you've got here!

What do you think about 8 digit hex codes, as explained here? The rightmost 2 digits represent alpha value.

I know apps like Photoshop don't use them, so maybe they'd only be implemented for the pickers that do use them. I know Chrome does.

I'd be happy to PR, but if you are rethinking color conversions for v3, maybe this is something that should be done on the color conversion library level? Let me know if you have any thoughts!

@casesandberg
Copy link
Owner

I will keep track of this to make sure it makes it into v3.0.0

@casesandberg casesandberg added this to the 3.0.0 milestone Jan 23, 2019
dvj1988 pushed a commit to dvj1988/react-color that referenced this issue Feb 19, 2021
dvj1988 pushed a commit to dvj1988/react-color that referenced this issue Feb 19, 2021
@dvj1988
Copy link

dvj1988 commented Feb 19, 2021

Raised this PR for resolving this.
@casesandberg

dvj1988 added a commit to dvj1988/react-color that referenced this issue Feb 19, 2021
dvj1988 added a commit to dvj1988/react-color that referenced this issue Feb 19, 2021
@Roy-05
Copy link

Roy-05 commented Feb 26, 2021

Any updates on this/ when it might be launched to production?

Also, any suggestions for what I could do in the meantime? My use case is that I want to use the AlphaPicker + HuePicker to interact with an 8 digit hex code that I will be receiving from another component. My current logic was:

  • Get 8 digit hex code from another component, eg. #ffffff80
  • Split it into 6 digit hex + alpha channel hex: #ffffff and 80
  • Convert 80 to decimal then divide by 255 to get alpha as 0.50
  • Feed the two values to hue picker and alpha picker
  • Suppose the use now changes hue picker to red = #ff0000 and alpha to 1.0
  • Convert alpha to corresponding hex code = ff
  • Append the two values = #ff0000ff and then send back to component

However, this seems cumbersome/ inefficient and susceptible to errors. Is there a more elegant/ alternate solutions for the problem?

Note: I MUST use 8 digit hex codes to communicate between the two components, don't have a choice there :/

Anyway, I appreciate any help and thank you for such an amazing library!

themetis pushed a commit to themetis/react-color that referenced this issue May 9, 2022
themetis pushed a commit to themetis/react-color that referenced this issue May 9, 2022
themetis pushed a commit to themetis/react-color that referenced this issue May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants