KML ARGB color doesn't shown correctly

帅比萌擦擦* 提交于 2019-12-07 21:42:05

问题


Here is the screenshot of the map that I'm working on:

and here is my KML code:

<Style id="line1">
    <LineStyle>
        <color>ff8C0A23</color>
        <width>2</width>
    </LineStyle>
</Style>

<Placemark>
<styleUrl>#line1</styleUrl>
<LineString><coordinates> ...

As you can see the color value is ff8C0A23, it's ARGB, right? So the RGB color is 8C0A23 that should looks like this:

But as you can see the color of the border is shown totally different in the map. Anyone knows how to fix it?


回答1:


https://developers.google.com/kml/documentation/kmlreference

According to: https://developers.google.com/kml/documentation/kmlreference#color

The order of expression is aabbggrr

<color>
Color and opacity (alpha) values are expressed in hexadecimal notation. The range of values for any one color 
is 0 to 255 (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. The order of expression is 
aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). For example, 
if you want to apply a blue color with 50 percent opacity to an overlay, you would specify the following: 
<color>7fff0000</color>, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.

See this color chooser: http://www.zonums.com/gmaps/kml_color/



来源:https://stackoverflow.com/questions/12812904/kml-argb-color-doesnt-shown-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!