Make the maximum value customizable #179
marekburiak
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions