HTTP color picker
Posted: Tue Oct 26, 2021 8:57 am
Hi,
I want to make a color picker which I can control through HTTP Set Requests.
I believe the only way is through a script, but I'm not sure how to write this script.
as for an example I would like to control it similar like this;
http://ip.ip.ip.ip:port/SetColorR=0G=255B=100/
I think the script would be something like this?
As second question;
If a script is working can you send values on the background to the script?
For example; I set a color through the SET request and after a 5 minute I SET the storage place with the script; will it directly load the color I have set?
I want to make a color picker which I can control through HTTP Set Requests.
I believe the only way is through a script, but I'm not sure how to write this script.
as for an example I would like to control it similar like this;
http://ip.ip.ip.ip:port/SetColorR=0G=255B=100/
I think the script would be something like this?
Code: Select all
@scriptname="";
@author="";
@version="";
@description="";
void InitEffect()
{
int r = 0;
int g = 0;
int b = 0;
}
void RenderEffect(r, g, b) //not sure how to 'read' the rgb values from set request
{
r = r;
g = g;
b = b;
}
void MatrixSizeChanged()
{
InitEffect();
}
If a script is working can you send values on the background to the script?
For example; I set a color through the SET request and after a 5 minute I SET the storage place with the script; will it directly load the color I have set?