W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css4-color] Make the r/g/b components be <number> rather than <integer>?

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Sat, 09 Jun 2012 08:59:32 +0200
Message-ID: <4FD2F454.3020208@kozea.fr>
To: www-style@w3.org
Le 09/06/2012 01:01, Tab Atkins Jr. a écrit :
>> >I'd be inclined to say there might be advantages to not defining
>> >rounding behavior here.  The experience I've seen with color
>> >management on different platforms has been that they round
>> >differently, but being off by one color component doesn't sound all
>> >that serious.  Being able to benefit from hardware acceleration may
>> >outweigh being able to define every result exactly.
> Given that this kind of rounding could happen at parse-time, I'm not
> sure I understand how hw-accel comes into this.  By the time the
> hardware sees the color, it's already been converted to a packed argb
> format, right?

It could happen at parse-time, or it could happen later. cairo for 
example take 3 or 4 floating point numbers in 0..1 for RGB(A), so 
WeasyPrint and tinycss convert to that when parsing. There may be some 
rounding later, but I think it is not the same across backends.

Simon Sapin
Received on Saturday, 9 June 2012 07:00:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:00 UTC