Questionable Color>>rgbTriplet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Questionable Color>>rgbTriplet

Nicolas Cellier
The red/green/blue component of a Color are currently stored each on 10 bits.
That about 1024 combinations.

rgbTriplet return values scales between 0.0 and 1.0.
But why does it round each component to 0.01 instead of 0.001?

OK, it's not used in trunk image, but...


Reply | Threaded
Open this post in threaded view
|

Re: Questionable Color>>rgbTriplet

Bert Freudenberg

On 19.12.2013, at 00:17, Nicolas Cellier <[hidden email]> wrote:

The red/green/blue component of a Color are currently stored each on 10 bits.
That about 1024 combinations.

rgbTriplet return values scales between 0.0 and 1.0.
But why does it round each component to 0.01 instead of 0.001?

Perhaps because it matches Color>>shortPrintString? 

OK, it's not used in trunk image, but...

Now with our accurate float printing, the rounding in rgbTriplet seems pretty useless - maybe we should just remove it?

- Bert -