473,396 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

"Web-safe" colours

I tried to grab an image from a Web page the other day. It turned out that
the page was made up of three horizontal bands, and part of the image was
in each. One band was a JPEG, another was a GIF and I have forgotten what
the main page was.

Apart from lining up the parts of the image, there was no discrepancy in
colours between the two formats. Is that what "Web-safe" means? I thought
that it just meant that the colours would be the same in any browser.

Doug.
--
ICQ Number 178748389. Registered Linux User No. 277548.
I find that the harder I work, the more luck I seem to have.
- Thomas Jefferson.

Sep 1 '05 #1
8 2229
Doug Laidlaw <la******@myaccess.com.au> wrote:
I tried to grab an image from a Web page the other day. It turned out that
the page was made up of three horizontal bands, and part of the image was
in each. One band was a JPEG, another was a GIF and I have forgotten what
the main page was.
Rather off topic here.

Since you've not provided an url for us to check we can only guess, my
guess is that it was done to use both file formats' advantages. Gif (or
preferably png) is better suited for the average computer generated
image, it offers (possibly lossless) compression. Jpeg is intended to be
used with photo realistic images. A composite image that consists of
both computer generated elements and a photo realistic section could be
spliced up and the sections coded in the appropriate format.
Apart from lining up the parts of the image, there was no discrepancy in
colours between the two formats. Is that what "Web-safe" means?
"Web safe" is a term used for images that use an image colour palette of
256 indexed colours. This harks back to the old days when a significant
number of clients could be expected to have a colour capability of just
256 colours, this is relatively rare nowadays. Restricting images to
this 256 colour palette is generally archaic.
I thought
that it just meant that the colours would be the same in any browser.


No such thing as guaranteed the same colours on every client system.

--
Spartanicus
Sep 1 '05 #2
Spartanicus wrote:
Doug Laidlaw <la******@myaccess.com.au> wrote:
I tried to grab an image from a Web page the other day. It turned out
that the page was made up of three horizontal bands, and part of the image
was
in each. One band was a JPEG, another was a GIF and I have forgotten what
the main page was.


Rather off topic here.

Since you've not provided an url for us to check we can only guess, my
guess is that it was done to use both file formats' advantages. Gif (or
preferably png) is better suited for the average computer generated
image, it offers (possibly lossless) compression. Jpeg is intended to be
used with photo realistic images. A composite image that consists of
both computer generated elements and a photo realistic section could be
spliced up and the sections coded in the appropriate format.
Apart from lining up the parts of the image, there was no discrepancy in
colours between the two formats. Is that what "Web-safe" means?


"Web safe" is a term used for images that use an image colour palette of
256 indexed colours. This harks back to the old days when a significant
number of clients could be expected to have a colour capability of just
256 colours, this is relatively rare nowadays. Restricting images to
this 256 colour palette is generally archaic.
I thought
that it just meant that the colours would be the same in any browser.


No such thing as guaranteed the same colours on every client system.


Yes, I knew that the "web-safe" palette was pretty irrelevant these days. I
didn't put my question very well. What I was trying to ask was: Did
"web-safe" guarantee that a colour that was in both file formats would look
exactly the same, whereas a colour outside the palette might not? From
your answer, I assume that I am right off the track here. The URL is
http://www.makinganation.com/ and the image in question is the circular
badge in the top left corner. I am a volunteer at the place described
there. It is actually housed to the right of the steps, behind the lady in
the blue skirt.

Doug L.
--
ICQ Number 178748389. Registered Linux User No. 277548.
Friends are quiet angels who lift us to our feet when our wings have trouble
remembering how to fly.
- Anonymous.

Sep 2 '05 #3
Doug Laidlaw wrote:
I thought that it just meant that the colours would be the same in any browser.


No such thing as guaranteed the same colours on every client system.


Yes, I knew that the "web-safe" palette was pretty irrelevant these days. I
didn't put my question very well. What I was trying to ask was: Did
"web-safe" guarantee that a colour that was in both file formats would look
exactly the same, whereas a colour outside the palette might not?

IIRC, web-safe only applied to the colours used by the "color" and
"bgcolor" attributes, and the CSS equivalents, and has nothing to do with
image display.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Sep 3 '05 #4
Doug Laidlaw <la******@myaccess.com.au> wrote:
What I was trying to ask was: Did
"web-safe" guarantee that a colour that was in both file formats would look
exactly the same
No, browsers may get the gamma correction wrong
http://entropymine.com/jason/testbed/gamma/
, whereas a colour outside the palette might not?
No difference/relation.
From
your answer, I assume that I am right off the track here. The URL is
http://www.makinganation.com/ and the image in question is the circular
badge in the top left corner.


The multiple images are the result of what used to be a relatively
popular but fundamentally wrong and flawed way of constructing a web
page. It involves creating the page design in a graphics editor as a
single image, then splicing the image up into multiple images so that
parts can be hyperlinked, then sticking them back together again in a
layout table.

--
Spartanicus
Sep 3 '05 #5
On Fri, 2 Sep 2005, Jim Moe wrote:
IIRC, web-safe only applied to the colours used by the "color" and
"bgcolor" attributes, and the CSS equivalents, and has nothing to do
with image display.


On colour display systems which have only 8-bit colour depth
(fortunately rarely a problem in practice nowadays), there -is- a
problem when the palette of a GIF image does not match the display's
own palette. Indexed PNG (PNG formats were not really being used yet,
back when I recall this being an active topic of discussion) is also
palette-based, and I don't see any reason it shouldn't exhibit the
same problem. This led, amongst other things, to authors complaining
about colour mis-matches between their images and their background
colours.

But it's a topic more for the neighbouring images group, than for
HTML. Nowadays, however, I rarely see the issues discussed -
presumably because those few still using 8-bit colour depth display
systems are assumed to be accustomed to sub-optimal results. My own
notes on the topic go back to 1997, based on even earlier experience,
when things were rather different in practice than they are now - even
if the underlying principles don't change.

best regards
Sep 3 '05 #6
Jim Moe wrote:
IIRC, web-safe only applied to the colours used by the "color" and
"bgcolor" attributes, and the CSS equivalents, and has nothing to do with
image display.


It applied to any colours you used -- in font and background colours,
images, java applets or elsewhere.

The idea being that on 256-colour displays, if you chose a colour that was
outside that range, you got a dithering effect, that didn't look very
pretty.

On modern displays though, there is no need for dithering, so the "web
safe palette" is a thing of the past.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Sep 3 '05 #7
rf
Toby Inkster wrote:
Jim Moe wrote:
IIRC, web-safe only applied to the colours used by the "color" and
"bgcolor" attributes, and the CSS equivalents, and has nothing to do
with image display.


It applied to any colours you used -- in font and background colours,
images, java applets or elsewhere.

The idea being that on 256-colour displays, if you chose a colour
that was outside that range, you got a dithering effect, that didn't
look very pretty.


Not quite.

It had do to with the 256 colour palette, true. But...

When choosing a colour *for each indivudual pixel* if the graphics card
already had that pixel in its [hardware] palette then all well and good. If
however the colour was not in the palette then the driver would search the
palette for a colour that was *nearest* to the new pixels colour. Bor
example nearest to #ffff01 just might be #eeee08, not really near at all,
but the "closest" colour in the current palette.

Paint a single gif (limited to 256 discrete colours) and all is OK. Paint
another gif with a totally different set of 256 colours and all hell breaks
loose. The new gif may override the palette with its colours and the old gif
has to make to with the new colours, which *will* be nothing at all like the
actual colours in that old gif.

In all, 256 colour cards and the resulting pandemodium with palettes and all
were a really very bad idea.

Cheers
Richard.
Sep 3 '05 #8
Spartanicus wrote:
Doug Laidlaw <la******@myaccess.com.au> wrote:
<snip>
Apart from lining up the parts of the image, there was no discrepancy in
colours between the two formats. Is that what "Web-safe" means?

"Web safe" is a term used for images that use an image colour palette of
256 indexed colours. This harks back to the old days when a significant
number of clients could be expected to have a colour capability of just
256 colours, this is relatively rare nowadays. Restricting images to
this 256 colour palette is generally archaic.


Actually it's a 216 colour palette. The remaining colours often dither
from one VGA screen to another. If you use the 216 colour palette you
should get pretty consistent results.
In general I would regard this palette as being overly cautious. If you
want to maintain accessibility, use the 'web smart' colour palette, and
retain the colour safe palette for instances of text on blocks of colour.

I thought
that it just meant that the colours would be the same in any browser.

No such thing as guaranteed the same colours on every client system.


True, colours look dramatically different on the Mac. It's a video card
issue, and something you can't second guess.

Geoff

Sep 4 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jason Huang | last post by:
Hi, In VB, we have windows control item "MainMenu", do we have this item in the ASP.Net C# web form? Or how could we make it? By the way, how about the ASP.Net 2005? Thanks for help. Jason
7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
1
by: Dgates | last post by:
This request might belong in a "SQL"-related newsgroup, but it's such a pain using Agent to subscribe to a new group (and download its 50,000 messages!) just to ask one question. So, since it...
3
by: TCB | last post by:
Hi, There are a couple of things that are bothering me, any help on these is greatly appreciated. This is using ASP.NET 2.0 1. I am sending email in my web app, using a simple form here is the...
0
by: JM | last post by:
Hello, I just want to know if there is a way to do the "Save to Web" functionality for MS Office documents in ASP.NET web application, similar to that of Sharepoint. It works like this: ...
0
by: kplkumar | last post by:
Hi I am new to this. I am trying to create a setup project to package our stuff and create an installer. This is what I want to do, I have a directory sructure in which we have our...
13
by: Kobee | last post by:
Hi, I'm having a few issues adapting to new 2.0 "website" project vs. the old 1.1 "web application". One of the major issues I'm having is with the notion of namespaces. Using the old way, I...
11
by: taoberly | last post by:
A few months ago I posted a question about using a file on my hard drive to perform cross-frame scripting and pull data from a server on my company's intranet. I eventually got this working using...
4
by: soren625 | last post by:
What I am trying to do is grab a little snippet of data from a remote page based on user input in a form. Take a look at this page: http://www.qrz.com/kb2gsd What I want to do is: when a user...
3
by: Ty Oft | last post by:
Hello Bytes! Maybe my question seems a bit silly (as one could simply answer it "Well, what are you more passionate about?" or stuff like that - please don't answer like this), but I am in a bit...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.