Problem for sending the correct color via OSC
Posted: 17 Aug 2019 18:21
Hello,
I am trying to change the color of some objects directly via OSC from my computer to the tablet.
It is said in the documentation that the value of the color attribute can range from 0 to 8355711: ((R*127 x 2^16) + (G*127 x 2^8) + B*127), where R, G and B are values between 0.00 and 1.00.
I tried to follow this rule by defining the color in an application like SuperCollider, but it does not seem to work.
The color I am sending is completely different...
~redLemurColor2 = (( Color.red(0.5)*127 * 2.pow(16)).asInt + ( Color.red(0.5).green*127 * 2.pow(8)).asInt + ( Color.red(0.5).blue*127).asInt);
Has someone succeed to send correct RGB information via OSC ? How ?
Thanks for the help
Christophe
I am trying to change the color of some objects directly via OSC from my computer to the tablet.
It is said in the documentation that the value of the color attribute can range from 0 to 8355711: ((R*127 x 2^16) + (G*127 x 2^8) + B*127), where R, G and B are values between 0.00 and 1.00.
I tried to follow this rule by defining the color in an application like SuperCollider, but it does not seem to work.
The color I am sending is completely different...
~redLemurColor2 = (( Color.red(0.5)*127 * 2.pow(16)).asInt + ( Color.red(0.5).green*127 * 2.pow(8)).asInt + ( Color.red(0.5).blue*127).asInt);
Has someone succeed to send correct RGB information via OSC ? How ?
Thanks for the help
Christophe