Problem for sending the correct color via OSC

Discuss problems and solutions.
Post Reply
XON
Newbie
Posts: 5
Joined: 29 Jan 2018 21:34

Problem for sending the correct color via OSC

Post by XON »

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
Post Reply