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

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 UTC