Real Object Color in Python Bridge

Hello,

I create a RealObject in the python bridge and want to set the color.
However, I don’t really get how to set the color properly that it is shown in the 3d viewer.
As far as I understand it is just one value and not 3 as I was used to?

Thank you,

Hello,

As far as I understand it is just one value and not 3 as I was used to?

Indeed, the color of a real object is actually an unsigned 32-bit integers with BGR byte-order :
out.data[0].color = (_BLUE_ << 16) + (_GREEN_ << 8) + _RED_

For example, if I want a red realobject :
out.data[0].color = (0 << 16) + (0 << 8) + 255

If I want the microsft vscode blue :
out.data[0].color = (239 << 16) + (164 << 8) + 0

Hope this helps,