|
|
On 04/27/2018 02:56 PM, Sven Littkowski wrote:
> I might have to round these numbers then, I guess. But that means losing
> exactness.
>
Well, yeah. That is the nature of the beast. floating point (a double)
gives you 52 bits of precision and integer color "256" is 8 bits.
I wouldn't worry about it. The human eye can't really tell the
difference between RGB(121,85,198) and RGB(122,85,198).
> Example:
>
> color rgb < 0.4748656, 0.3364377, 0.7790974 >
R = 0.4748656 * 255 = 121
G = 0.3364377 * 255 = 85
B = 0.7790974 * 255 = 198
(I never understood why the x87 uses 80 bit numbers internally, to
minimize rounding error in calculations, but only allowed inputs and
outputs of 64 bits. Why can't I have all those bits?)
--
dik
Rendered 328976 of 330000 (99%)
Post a reply to this message
|
|