Layer Color other than given RGB

On 23/02/2017 at 00:31, xxxxxxxx wrote:

Hi there,

I tried to set a Layer Color via

> layer_data = layer.GetLayerData(doc)
>
> layer_data['color'] = c4d.Vector(200,100,50)
>
> layer.SetLayerData(doc,layer_data)

If I take 255,0,0 as RGB-Values, it's a red one so this works basically.
But the result of 200,100,50 is a white layer instead of a brown one.

why?

On 23/02/2017 at 04:59, xxxxxxxx wrote:

Hi,

in Vectors colors do usually get stored in floating point values ranging from 0.0 to 1.0 instead of integer values from 0 to 255.

On 24/02/2017 at 00:56, xxxxxxxx wrote:

k. are there other - maybe simpler than calculating from 0-255 to 0-1 - possibilities since the RGB-Values in the ColorChoosers are also from 0-255?

On 24/02/2017 at 09:01, xxxxxxxx wrote:

Converting 0-255 to 0-1.0 is only a matter of dividing the value by 255. Can't get much simpler than that

Steve