Transparent Background Hex Color Code

I have always had the problem of not getting a transparent background color for my images or other things i code which includes a background; for instance, i had a logo which i designed and the background was white but i wanted the background to be transparent, so i could include it in other containing stage where the background colors were different from white and didn’t match. normally i had to depend on Programs to add a transparent background for me when creating logos or other designs which i do, but recently i just found out, that if i was to create a new image for example having a stage area (background area), i could define the color for that background using a Hex color code, normally it will provide the color hex codes as display, but i didn’t know which color was for transparency. to go around this, i found out that this code #EDEDED is actually the Hex color code for Transparency, so if you want any background to be transparent especially in Images, you can apply this there.
Example of usage
In CSS, it might work depending on various factors such as computer type or browser type.



body {
color: black;
background-color: transparent;
}

Above some browsers doesn’t detect the transparent value, only if that didn’t work,
so you should do this instead.


body {
color: black;
background-color: #EDEDED;
}

The above actually gives you a transparent background only in images(esp dot png),
because i tried it and it worked but it also depends on your computer as well. but i
also tried this in CSS and for some it worked and others it did not, but mostly, you
can apply this on an image to get a transparent background. try it out.

For images simple just select the color for background and add the RGB color number which is R:237 , G:237 B:237 ; if the image program you’re using doesn’t have an input for Hex or RGB, you can input the number for Hue, Sat and Lum. (Hue:160, Sat:0 and Lum:223.)
Most Application wouldn’t even define this properly when using Hue, Sat and Lum, so the RGB is much more better to use.

0

About Charming Prince

Being a Web Developer/Web Author, i had an idea to disseminate my knowledge in the field of web development to other people by opening this online free tutorials on programming languages, in so doing, to share ideas where applicable...As well as to share ideas in related area pertaining to information dissemination and media such as Movies, Music , and Games. as per these are the areas which i like the most and i think most people do like this area as well, so I'll try to make my explanation short but concise...
This entry was posted in Programming, Tutorial and tagged , , , , , . Bookmark the permalink.

5 Responses to Transparent Background Hex Color Code

  1. Custom avatar Bob says:

    I didn’t know that the Hex for transparency was #ededed, i tried this for an image, and it actually works. I think this works with images only, tried it on css but the value wasn’t the background i wanted.

  2. Lenix says:

    body {
    color: black;
    background-color: #EDEDED;
    }
    for this instances….that Ive encountered..I used CSS for all the Designs..actually having images with transparent backgrounds are in PNG form..you can set transparent BG for all of your images by using ADOBE PHOTOSHOP then save it as PNG file…or you can use EYEDROPPER or WEBTOOLKIT for copying the exact hex code of a particular area.. for this case the resulting link has a default border color …you can removed this by using CSS code … for ex. #layout img{
    border-style:none;}

  3. tony says:

    thank you this work well with my

  4. Ike says:

    Sorry but that doesn’t sound right. #EDEDED is the hex for a light shade of grey. I don’t see why a browser would interpret that as transparent. I mean, how transparent?! For transparency you can use rgba(237, 237, 237, 0.3) for the same light grey where 0.3 is the opacity. If you wanted the background to be completely transparent then just don’t set a background colour at all.

Leave a Reply

Your email address will not be published. Required fields are marked *

Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar