Tad's IT Blog
Posts tagged conversion
Converting HTML and KML Color
Oct 16th
This is a shorty for an ill-defined subject that I recently ran into when making a recent Bing Maps KML implementation.
When dealing with KML styles, the KML color space is defined differently than most web developers are used to. Instead of being defined in normal RGB hex, they are ARGB, or RGB with Alpha Channel.
In normal HTML color, one is used to hex representations like:
AABBCC
In KML, the first two octets are used to define the transparency or alpha channel, and then the next 6 are RGB in reverse order.
So, if you’ve got a KML color of
50AABBCC
This would then translate to CCAABB in HTML.
Just a note, in case any one else has been infuriated or confused by such.







Recent Comments