12

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 color

Cœur
  • 37,241
  • 25
  • 195
  • 267
Nic
  • 609
  • 4
  • 12
  • 21
  • 1
    wow, thats I have never thought in my life, how can it be done? – YOU Nov 26 '09 at 04:49
  • I asked the same question [a few days ago](http://stackoverflow.com/questions/1751263/hex-colors-numeric-representation-for-transparent). – Pekka Nov 26 '09 at 04:52
  • Does this answer your question? [Hex colors: Numeric representation for "transparent"?](https://stackoverflow.com/questions/1751263/hex-colors-numeric-representation-for-transparent) – Tom Mar 28 '20 at 19:52

5 Answers5

15

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

Noon Silk
  • 54,084
  • 6
  • 88
  • 105
5

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.

ckknight
  • 5,953
  • 4
  • 26
  • 23
  • ckknight- Hi Thanks for your responce. I can use only 6 letters after # so 05FF00FF & FF00FF05 doesn't work for me. Is there any other solution friend ? – Nic Nov 26 '09 at 05:18
  • If you're dealing with RGB codes, then no - your six digits are RRGGBB, end of story. I suggest you read the documentation for the program or API you're using, because there's no way to point you in the right direction. Different programs/APIs use different formats. – Chris Jun 24 '10 at 10:04
4

You can also use #00000000

I found that after using #1C00ff00 which also worked

Scootypoop
  • 41
  • 1
3

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.

Donald Shahini
  • 835
  • 9
  • 20
0

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