开发者

What is the HEX code for Transparent color?

开发者 https://www.devze.com 2022-12-12 19:08 出处:网络
I want to set color as transparent. In RGB 255 0 255 with alpha 5 may work as transparent, But How to get it in HEX ?

I want to set color as transparent. In RGB 255 0 255 with alpha 5 may work as transparent, But How to get it in HEX ?

What is the HEX code for Transparent colo开发者_Python百科r


There is no such thing; transparency is done via another channel.


It depends on the format, some systems require RRGGBB, which doesn't include alpha.

Some have their format as AARRGGBB, so your provided color would be 05FF00FF.

Conversely, some have their format as RRGGBBAA, thus your provided color would be FF00FF05.


For me it worked using the format #AARRGGBB so the one working for me was #1C00ff00. Give it a try, because I have seen it working for some and not working for someone else. I am using it in CSS.


You can also use #00000000

I found that after using #1C00ff00 which also worked


You can use rgba(255,0,255,1)

 <svg class="svg_element" style="margin-top:0px;margin-left:560px">
        <circle cx="25" cy="25" r="20" fill="rgba(128, 0, 128, 0.75)" 
            stroke="rgba(0, 255, 0, 0.25)" stroke-width="10"/>
        <circle cx="75" cy="25" r="20"
            fill="rgba(0, 255, 0, 1)"
            stroke="rgba(0, 0, 255, 0.1)" stroke-width="10"/>
        <circle cx="125" cy="25" r="20"
            fill="rgba(255, 255, 0, 0.75)"
            stroke="rgba(255, 0, 0, 0.25)" stroke-width="10"/>
 </svg>

here is fiddle

0

精彩评论

暂无评论...
验证码 换一张
取 消