.gif & Hex background not the same colour

M

M.Trinder

I am wanting to show a family tree on a web page and have borrowed an idea
from another site.
The site I have borrowed the idea from is in white and mine is #CCCC99
(204,204,153). To make the tree work, the frame work has little gif images
to link the family members, but when I apply the colour of my page to the
gif image it is not the same colour, why is this. Or does anyone have
another solution to this?
 
B

brucie

The site I have borrowed the idea from is in white and mine is #CCCC99
(204,204,153). To make the tree work, the frame work has little gif images
to link the family members, but when I apply the colour of my page to the
gif image it is not the same colour, why is this.

browsers general don't gamma correct or they may gamma correct images
but not html/css or vice versa.
Or does anyone have another solution to this?

while viewing the page in the browser use an eye dropper to suck the
image color up. use that image color in your css.
 
P

PeterMcC

brucie said:
browsers general don't gamma correct or they may gamma correct images
but not html/css or vice versa.


while viewing the page in the browser use an eye dropper to suck the
image color up. use that image color in your css.

I can't entirely visualise what you're doing with the images so this may be
inappropriate - you could use a transparent background on the images so that
the web page background shows through - then you wouldn't have to worry
about getting a match.
 
T

Toby A Inkster

M.Trinder said:
To make the tree work, the frame work has little gif images
to link the family members, but when I apply the colour of my page to the
gif image it is not the same colour, why is this. Or does anyone have
another solution to this?

GIFs have a limited (256 colour) palette. Try using PNG instead.
 
T

Thomas Mlynarczyk

If your display is set to 16bit colors only, then the browser must somehow
"translate" the true colors of your HTML and your GIF's palette into 16bit
colors. It seems that some browsers use different methods for pictures and
background colors (like "rounding up" to the next 16bit color or dithering)
to accomplish this. Live with it or make the background of your GIFs
transparent so they will show the HTML background instead. With 24/32 bit
colors, this problem should not happen.
 
P

PeterMcC

brucie said:
me? it was HIM --->

Point taken.

Never the less, brucie, I often can't entirely visualise what you're doing
with the images -for which I'm grateful :)
 
S

Steven

Toby A Inkster said:
GIFs have a limited (256 colour) palette. Try using PNG instead.

I had the same problem on IE, but switching to PNG didn't solve it.
It displays correctly on Mozilla/Firebird.
 
A

Augustus

M.Trinder said:
I am wanting to show a family tree on a web page and have borrowed an idea
from another site.
The site I have borrowed the idea from is in white and mine is #CCCC99
(204,204,153). To make the tree work, the frame work has little gif images
to link the family members, but when I apply the colour of my page to the
gif image it is not the same colour, why is this. Or does anyone have
another solution to this?

You might check the settings in the program you are using to create the GIF
files...

If you are setting the background of the GIF to #CCCC99 and then when you
save it you are using "web safe colors" or "web safe color palette" (or
something named similarily) the program will automatically change your
background from #CCCC99 to the closest websafe color.
 
M

M.Trinder

O.K
I have now tried to make the background transparent, my first gif worked
perfectly.
The second one has loads of little flecks on it and I am buggered if I can
find out how to copy what I did with the first one. I am using PSP 7.
Anyone know what i am doing wrong this time?
 
T

Toby A Inkster

Augustus said:
the program will automatically change your
background from #CCCC99 to the closest websafe color.

#cccc99 *is* a so-called web safe colour.
 
A

Augustus

M.Trinder said:
O.K
I have now tried to make the background transparent, my first gif worked
perfectly.
The second one has loads of little flecks on it and I am buggered if I can
find out how to copy what I did with the first one. I am using PSP 7.
Anyone know what i am doing wrong this time?

The little flecks are the "matte color"

To make the edges of your transparent GIF look smoother, PSP is putting in
the matte color (to provide a transition from your color to the background
color specified as the matte)

When you save the file, should be an option to disable the matte color
 
R

Richard

M.Trinder! said:
O.K
I have now tried to make the background transparent, my first gif worked
perfectly.
The second one has loads of little flecks on it and I am buggered if I
can find out how to copy what I did with the first one. I am using PSP 7.
Anyone know what i am doing wrong this time?

What you need to do is to use a background color which is not multicolored.
For instance, rgb(255,150,200) would have bits of green and blue "flecks" to
make up the color.
make the background & transparent color, 255,0,0, and suddenly it all goes
away.

If you want a white background then you can use 255,255,255, without a
problem.
but not 255,240,230.

I have a small program called "giffy" which makes a single color
transparent. And they mean single.
I usually use pure red and make it transparent. Or a color which is not
obvious in the master.
but if use 255,0,10, I get the flecks.
 
V

Voetleuce en f?nsievry

Thomas Mlynarczyk said:
If your display is set to 16bit colors only, then the browser must somehow
"translate" the true colors of your HTML and your GIF's palette into 16bit
colors. It seems that some browsers use different methods for pictures and
background colors (like "rounding up" to the next 16bit color or dithering)
to accomplish this. Live with it or make the background of your GIFs
transparent so they will show the HTML background instead. With 24/32 bit
colors, this problem should not happen.

Or make the GIFs 2 pixels wider and higher and add a black 1 pixel
border around it. Then the user won't notice that you've fibbed it on
the colour side.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top