back to opendesktop.org

Transparency in themes?


#1

Hello my name is John, I am wondering how to get transparency in my own theme :disappointed_relieved:
I figured why not just ask here, Maybe even make this thread (The transparency thread) :innocent:
Well all suggestions and ideas are welcome :point_down: :point_down: :point_down:


#2

If you you use HRD photos for creating themes you can make them trasparent by https://aurorahdr.com . Find the abovementioned option or “hdr denoise-reduce opacity”


#3

Very much thanks for the info ! i tested to use png pictures thou that did not work so i thought editing the pictures was meaningless, I will try this when i get home on the weekend, I have no clue what you mean by htm or what you said thou il just google it :yum: :+1: If anyone wants to see the result’s when i am done then please say it here and i will probably share it on the site…


#4

If you’re trying to make components to an xfce theme, what I did was
to edit my .xpm files with a text editor after doing bulk conversions
from .png files. So, maybe set the things in your original .png that you
want to be transparent to some obnoxious color, e.g. pink when pink
is a color that’s not even close to the colors in your theme. I used a
bulk conversion program for graphics called XnConvert to convert all
of my .png files to .xpm files at once. xpm files are in a text format so
quite editable with any text editor. Then it’s just a matter of eliminating
my obnoxious color (hot pink). Like this:

/* XPM */
static char * left_active_xpm[] = {
“4 64 4 1”,
" c #FF69B4", (here’s the obnoxious hot-pink color)
". c #000000",
"+ c #84ABF4",
"@ c #0D3079",
" +@.", blah, blah, blah, blah, etc.

would become:
/* XPM */
static char * left_active_xpm[] = {
“4 64 4 1”,
" c None", (replaced with None = transparency)
". c #000000",
"+ c #84ABF4",
"@ c #0D3079",
" +@.", blah, blah, blah, blah, etc.


#5

I’m no rocket surgeon, but from my useless experience different themes use different files for coloration, some are global like GTK2 or GTK3 and some are local, like cinnamon or xfce, but they all rely on one of two things: hexadecimal, (#ff000 or #1793D1) or rgba (rgba 255,255,255,1 or rgba 91,161,83,0.5) for colourization. If you want to make hexadecimal transparent, simply substitute either the words “none” or “transparent” for the color, if you want to make rgba transparent, substitute the last number with 0. If you want a tint that you can see through, rgba takes a decimal argument, i.e. 0.1 to 0.9 at the end of its sequence, (1 gives you a solid color), whereas hexadecimal does not transparentize to a color you can see through naturally and requires additional code to make it transparent(at least in my experience), such as:
.half{
opacity: 0.5;
filter: alpha(opacity=50);
}.