[OSM-talk] # with color code

Yves yvecai at gmail.com
Thu Sep 28 18:06:13 UTC 2017


The value is defined as an hexadecimal rgb code, starting with a #. 
I think most data consumers try to decode it with or without a #, its an easy to fix typo.
Yves 

Le 28 septembre 2017 18:59:15 GMT+02:00, James <james2432 at gmail.com> a écrit :
>usually # specifies that it's a hexidecimal number vs a base 10 number.
>When you have letters A-F it's obvious that it's hexidecimal and can be
>implecitely converted.
>
>The issue is when you don't have letters:
>255
>
>in hexadecimal 255 is
>2*16^2
>+
>5*16^1
>+
>5*16^0
>= 512+80+5=597
>
>255 base 10 would be represented by ff in hex.
>
>On Sep 28, 2017 12:08 PM, "Jack Armstrong Dancer at sprynet.com" <
>jacknstacy at sprynet.com> wrote:
>
>> It's been my experience that colors render just fine without a '#'
>before
>> the code number. Is usage of a # prefix really necessary? What
>problems
>> will occur if it isn't attached? Thanks :)
>>
>> _______________________________________________
>> talk mailing list
>> talk at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/talk
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20170928/7fbdd7af/attachment.html>


More information about the talk mailing list