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

Improvement: change from 0-1 to 0-255 RGB colours #142

Open
cue-td opened this issue Apr 14, 2023 · 1 comment
Open

Improvement: change from 0-1 to 0-255 RGB colours #142

cue-td opened this issue Apr 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@cue-td
Copy link

cue-td commented Apr 14, 2023

Could it be considered to change from the current 0-1 to the more standard 0-255 scale for RGB colours?
This would make choosing a specific colour from an RGB Color Chart far more trivial than converting.
i've purposely picked a weird colour here as an example: For a light green, this would be R102,G255,B102. and i could then scale those numbers for brightness. I could simply type these numbers in to the config. While is is trivial to convert, i now have to convert to a 0-1 scale potentially multiple times per colour.

This could further be inproved upon with an addition of a seperate 'brightness:' state where i can statically define a colour (eg R255 G0 B0) and setting brightness to 0.5 would automatically change all defined RGB values in the [led_effect].

Using the idle example from the docs, this is how i'd envisage it would work. the result would be 'light shade of blue' at 50% brightness.


[led_effect panel_idle]
autostart:              true
frame_rate:             24
brightness:  0.5
leds:
    neopixel:panel_ring
layers:
    breathing  10 1 top (128,128,255)

@julianschill
Copy link
Owner

Colors from 0 to 1 is the Klipper way to define colors. But I was already thinking about supporting something like (#12FFAB). So it's on the backlog. Adding brightness is also possible, but I was thinking of making it a parameter for SET_LED_EFFECT.

@julianschill julianschill added the enhancement New feature or request label Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants