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

add setColor #25

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

add setColor #25

wants to merge 1 commit into from

Conversation

thijstriemstra
Copy link
Contributor

No description provided.

@srwi
Copy link
Owner

srwi commented Apr 11, 2024

Hi @thijstriemstra, could you please motivate this change a bit? I think the new color picker value should be broadcasted to active websocket connections so that the web ui is in sync with the actual color value.

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Apr 11, 2024

I have a project with 16 predefined colors and a button that allows you to cycle through them. I use setColor to change the color when the button is pressed and a broadcastMessagethat sends a currentColor and on the client the color is changed. Without this change I would have to add 16 color pickers (all named Color? not sure if it's even possible), making the UI very confusing for the end user. Now one color picker controls the LED overall color (and using the button sets the colorpicker as well).

I can keep the code submitted in this PR in a separate CustomColorclass or something but just thought this might be a simple enhancement. Feel free to close it.

@srwi
Copy link
Owner

srwi commented Apr 12, 2024

If I understand correctly you added some more code to your project to broadcast the changed color to active clients. I really like that and would appreciate if you could add that functionality to this PR so that the new feature is more complete.

@thijstriemstra
Copy link
Contributor Author

I really like that and would appreciate if you could add that functionality

I do have that code somewhere, no problem. I'll mark this as draft till I find it.

@thijstriemstra thijstriemstra marked this pull request as draft July 28, 2024 21:07
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

Successfully merging this pull request may close these issues.

None yet

2 participants