[Mapcss] Proposal: Drop css's ugly colour specifications
tom.davie at gmail.com
Mon Feb 7 09:12:19 GMT 2011
The css mailing list recently had a long discussion about hex codes and names being a really ugly way of dealing with colours, and arguing that they should be dropped in favour of rgb(r,g,b) and rgba(r,g,b,a) (along with potentially other colour spaces for print for example). The conclusion was that there's a lot of legacy css out there that this would break, and a lot of html/css editors that would continue to produce broken code. Because of this, they never changed the standard. We have a far smaller problem here – our existing stylesheet base is much smaller, and hence perhaps have the chance to nip the problem in the bud now.
I propose that all colour specifications be replaced with the modern specifiers.
I also have a second proposal related to this. CSS typically uses the range 0 to 255 even in these specifiers. I'd like to propose that we use the cleaner 0.0 to 1.0 range. This has the advantage of not exposing an implementation detail, though I acknowledge there's a disadvantage in deviating from what css does here.
Tom 'Beelsebob' Davie
More information about the Mapcss