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

Re: [css4-color] 4 Parameters in RGB() and HSL()

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Wed, 25 Jan 2012 16:04:02 +0100
Message-Id: <171F139D-57F4-444F-A42A-1AE32ECD1050@crissov.de>
To: www-style list <www-style@w3.org>
Marat Tanalin:
> 
>    rgb(255, 0, 64, 1%) /* 1% */
>    rgb(255, 0, 64, 1)  /* 100% */

The first line should be invalid, because quite some time ago the WG decided that you cannot mix percentages and (byte) integers in three-parametric ‘rgb()’ – implementations have been changed afterwards – and we should keep it that way. Therefore the second line would have an alpha value close to 0.4%.

That means

  rgb(255, 0, 64, 0.7)

would be treated the same way as

  rgb(255, 0, 64.3)

is today. (I’m not sure right now, whether it’s actually invalid or rounded.) Therefore, it differs from

  rgba(255, 0, 64, 0.7)
Received on Wednesday, 25 January 2012 15:04:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:49 GMT