PDA

View Full Version : Web design suggestion.


Coma
November 14th, 2002, 06:15 PM
The first thing I saw when I first looked at your site was the way all of your background colors are done in normal html hex color codes.

The problem with this is, the color values on individual monitors vary at times, from that of a *.gif *.jpg or *.png image.

And it causes the design to look unprofessional.

In the past I had this problem and fixed it by taking the back ground color and making a 1 pixel image (same format and same program//compression setting as the rest of the images on the site) and setting it as a background image on all the pages.

-Coma

Pontemonti
November 14th, 2002, 11:59 PM
Well...

Of course colors may look different on different monitors (depending on how you've configured the monitor) but that would make ALL colors (not only HTML colors or image colors - the monitor doesn't treat them different) become different. It may be a browser problem, though. Netscape may decode a hex code into another color than Internet Explorer does, but it really shouldn't.
Now, let's say the browser's do treat the hex colors differently. If we would do as you say and use a 1x1 pixel image for the background, we would really _have_ to do the same thing with all other colors on the site - table backgrounds and font colors for example. That would IMO be rather silly and it wouldn't work with old(er) browsers. If the browsers treat hex colors differently (I still don't know why they should - hex coded colors is just a shorter way of saying Red: [0-255], Green: [0-255], Blue: [0-255] and there's no reason for the browser to mess around with those values), I doubt there's anything we can do about it.

Coma
November 15th, 2002, 01:22 AM
All image editors encode image files at slightly different values.
You would only need to use back grounds on the areas where the images collide with the back ground, this way no matter what monitor//computer, they would look the same.

Its the only way I have found to avoid the problem.
(and I've seen web sites look perfect on one comp, and look horrid on others. this isn't some isolated thing that only happens when the user has a faulty computer.)

I'm using the latest version of IE...

this wasn't an attack - just a suggestion.

Pontemonti
November 15th, 2002, 06:13 AM
I still can't see why it would make a difference. Sure, some image editors may encode the images at a different value, but the reason is probably because you're using the wrong settings or because you are using too many colors and save the image as a GIF file.
But there shouldn't be any difference between different computers - the site should still look the same. If it doesn't, it must have to do with how the monitor is set up (what the colors are set to, how bright it is, contrast etc) or how many colors the monitor can/is set to display. For example, 256 colors looks pretty bad on most sites.
So, I don't think using background images will help anything at all. It's all about choosing the correct hex color codes from the final saved image (if you've saved to GIF this is extra important since the program might have altered the colors a bit to be able to use only 256 colors)...

Coma
November 15th, 2002, 08:23 AM
Ok, I figured out what happens, some people run lower grade vid cards, or run at High Color (16BIT).

Lots of computers don't even have the ability to run at anything higher.

If you use windows its easy to change the setting.

look at the site in 16bit and you will see what I'm talking about. The comp I am on right now runs at 32bit and doesn't have the problem.

gekitsu
November 15th, 2002, 10:39 AM
still, i encountered something similar once before, when i coded on my homepage.

i had one transition graphic file that started black on one end, had some fuzz inbetween (steel teeth) and ended on a certain gray level.
the table background next to the image was exactly the same gray.
i know because:
i coded the gray hex values by hand
i chose my colors by hand, compressed as png-8 and did the comprssion palette on my own to match the gray values exactly.

still, in an earlier verion of opera, you could clearly see a difference between the png-ed gray value and the hex gray in html.
it was a small difference but it was noticeable.

no idea where it came from... i didn't encounter this in iexploder... and i thought no software reads png worse than ie...

Pontemonti
November 15th, 2002, 01:01 PM
Originally posted by Coma
look at the site in 16bit and you will see what I'm talking about. The comp I am on right now runs at 32bit and doesn't have the problem.
Oh yeah, I can see the difference with 16 bits colors...
With some simple maths we can understand why...the hex codes define red, green and blue colors in the range 0-255. That makes it 256*256*256 different color combinations - almost 17 million different colors. 16 bit colors mean 2^16 colors which equals 65536 colors (quite the difference compared with 17 million!). 32-bit colors allow for over 4 billion different colors, which means that ALL hex color codes can be displayed.
That's the color problem. To make it look better, what should be done is switch the colors to 16-bit safe ones...
Anyway, thanks for telling! I didn't think of that since the site has always looked great for me :D

Pontemonti
November 15th, 2002, 01:06 PM
Originally posted by gekitsu
still, in an earlier verion of opera, you could clearly see a difference between the png-ed gray value and the hex gray in html.
it was a small difference but it was noticeable.

no idea where it came from... i didn't encounter this in iexploder... and i thought no software reads png worse than ie...
Well, that may be Opera reading/displaying the hex color codes incorrectly. Maybe it could only handle 256 colors? Or maybe Opera really sucked at reading PNGs?