Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Make the maximum value customizable #146

Closed
marekburiak opened this issue Dec 1, 2020 · 0 comments
Closed

Make the maximum value customizable #146

marekburiak opened this issue Dec 1, 2020 · 0 comments

Comments

@marekburiak
Copy link

Hi,

this might be similar to "min/max value options for all slider types". My use case is that I'd like to use the color picker to control single color and rgb strips via a web interface. The issue is that the values e.g. for r,g,b are only integers between 0-255 which is 8 bit resolution. My light controller can do up to 16bits (so 65536 distinct light levels).

I need to use the higher resolution so that I can control the lights at very low light intensities and 255 levels is not enough. Especially if I also want to compensate for non-linear brightness perception of human eye. Anyway, what I'd like to be able to do is to set the sliders to go e.g. from value 0 to 1000 (so basically be able to set the brightness in 0.1% steps).

Maybe one of more generic approaches to implement this would be to add an option to override get/set functions. So one could for example override rgb object get/set functions. The input parameters (r,g,b,h,s,l,...) would always be values in 0-1 range (not sure about the kelvin one). So in my case I would override rgb get/set to map 0-1 to 0-1000. Someone else might need to override rgbString to not return the css notation but something else (obviously this can also be done currently by string interpolation of the rgb object...if you're happy with 0-255 range that is).

If that's too much :) then maybe just add more supported formats, like you have rgb, rgbString, hsl, hslString, you could add something like rgbNormalized, hslNormalized,.... where one could set and get values in 0-1 range.

And thank you for an already nice and functional color picker.

@jaames jaames closed this as completed Apr 5, 2021
Repository owner locked and limited conversation to collaborators Apr 5, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants