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

Feature: Specify min/max for default slider color, but not actual value #168

Closed
aletheia7 opened this issue Mar 27, 2021 · 5 comments
Closed

Comments

@aletheia7
Copy link

I am using the default color picker. When I set the color wheel/slider to #000a07, the wheel/slider turn black. I use the color picker to set colors for an LED device. When I set my LED device to #000a07, I get a nice low green color, but the picker/slider only shows black.

I would like to have a rgb/hex color correction setting so that the wheel/slider can show some color when I use very low values close to black.

Thank you.

@jaames
Copy link
Owner

jaames commented Mar 27, 2021

if I understand what you're asking, color/gamma correction is something that can vary wildly depending on LED hardware. iro.js is intended to be a general purpose color picker, not an LED driver, so I don't think it would be reasonable to add this into the core library?

You'll probably want to run the color that iro.js gives you through your own math to adjust it to suit whatever LED stuff you're working with

@jaames jaames closed this as completed Mar 27, 2021
@aletheia7
Copy link
Author

Perhaps this is a color picker bug? When I set the color picker to value #000a07 (rgb(0, 10, 7)) it displays rgb(0, 0, 0).

@jaames
Copy link
Owner

jaames commented Mar 28, 2021

Are you sure? #000a07 is just a very dark color, have you tried using a tool to give you the actual on-screen color?

Here's a video showing the on-screen colors in the latest build of iro.js running in Chrome on macOS. Note that the red channel is off because I'm using a screen filter, but the colors shown in the wheel are otherwise accurate:

out.mp4

Here's #000a07 in a third party color picker:

Screenshot 2021-03-28 at 14 33 35

@aletheia7
Copy link
Author

Here's a screenshot of Chrome Developer Tools Inspector showing "fill: rgb(0,0,0)" of the Picker when it is set to #000a07:
Screenshot

@jaames
Copy link
Owner

jaames commented Mar 29, 2021

that is expected; the wheel lightness works by positioning a black circle over the wheel and changing its opacity depending on the lightness level. more lightness = less opacity, and therefore more of the color underneath (from the hue and saturation parts of the wheel) will show. its a bit of a weird trick but its cheap, easy, and accurately mixes the color on the wheel. you can see the opacity style is present in the screenshot you sent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants