[Mapcss] Proposal: Drop css's ugly colour specifications
tom.davie at gmail.com
Mon Feb 7 12:14:59 GMT 2011
On 7 Feb 2011, at 11:53, Steve Bennett wrote:
> On Mon, Feb 7, 2011 at 8:12 PM, Thomas Davie <tom.davie at gmail.com> wrote:
>> 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.
> To play devil's advocate, for those of us that do any web development,
> the #abcdef format is how we think of colours. I have a feel for what
> #ffaaaa is going to look like. rgb(1.0,0.6,0.6) is a bit weird,
> unfamiliar...and frankly, not any more aesthetically appealing to my
> So I think accepting rgb(255,110,110) as an equally-accepted
> alternative format is fine, but I don't see a compelling reason for
> introducing a new colour specifier and breaking the link with CSS
> here. (A compelling reason might be if it made MapCSS more
> approachable to the cartographic community, for example...)
I can see the argument for not specifying the values as floats – css doesn't allow it. The reason I chose floats was that for beginners (and potentially cartographers too) it's much more natural to think in terms of percentages or fractions of 1, than to think in terms of fractions of 255. Using 0 to 255 feels to me like we're leaking implementation details and exposing something programmers are familiar with to cartographers.
A random aside: when we come to using 10 or 12 bit colour, what happens to using 0-255? Floats support this naturally.
Tom 'Beelsebob' Davie
More information about the Mapcss