"Web-safe" colours

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Doug Laidlaw

    "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.

  • Spartanicus

    #2
    Re: "Web-safe" colours

    Doug Laidlaw <laidlaws@myacc ess.com.au> wrote:
    [color=blue]
    >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.[/color]

    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.
    [color=blue]
    >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?[/color]

    "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.
    [color=blue]
    >I thought
    >that it just meant that the colours would be the same in any browser.[/color]

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

    --
    Spartanicus

    Comment

    • Doug Laidlaw

      #3
      Re: &quot;Web-safe&quot; colours

      Spartanicus wrote:
      [color=blue]
      > Doug Laidlaw <laidlaws@myacc ess.com.au> wrote:
      >[color=green]
      >>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.[/color]
      >
      > 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.
      >[color=green]
      >>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?[/color]
      >
      > "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.
      >[color=green]
      >>I thought
      >>that it just meant that the colours would be the same in any browser.[/color]
      >
      > No such thing as guaranteed the same colours on every client system.
      >[/color]

      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.

      Comment

      • Jim Moe

        #4
        Re: &quot;Web-safe&quot; colours

        Doug Laidlaw wrote:[color=blue][color=green]
        >>[color=darkred]
        >>>I thought that it just meant that the colours would be the same in any browser.[/color]
        >>
        >>No such thing as guaranteed the same colours on every client system.[/color]
        >
        > 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?
        >[/color]
        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)

        Comment

        • Spartanicus

          #5
          Re: &quot;Web-safe&quot; colours

          Doug Laidlaw <laidlaws@myacc ess.com.au> wrote:
          [color=blue]
          >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[/color]

          No, browsers may get the gamma correction wrong

          [color=blue]
          >, whereas a colour outside the palette might not?[/color]

          No difference/relation.
          [color=blue]
          >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.[/color]

          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

          Comment

          • Alan J. Flavell

            #6
            Re: &quot;Web-safe&quot; colours

            On Fri, 2 Sep 2005, Jim Moe wrote:
            [color=blue]
            > 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.[/color]

            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

            Comment

            • Toby Inkster

              #7
              Re: &quot;Web-safe&quot; colours

              Jim Moe wrote:
              [color=blue]
              > 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.[/color]

              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

              Comment

              • rf

                #8
                Re: &quot;Web-safe&quot; colours

                Toby Inkster wrote:[color=blue]
                > Jim Moe wrote:
                >[color=green]
                >> 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.[/color]
                >
                > 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.[/color]

                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.


                Comment

                • geoff_syndicate

                  #9
                  Re: &quot;Web-safe&quot; colours

                  Spartanicus wrote:[color=blue]
                  > Doug Laidlaw <laidlaws@myacc ess.com.au> wrote:[/color]

                  <snip>
                  [color=blue][color=green]
                  >>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?[/color]
                  >
                  >
                  > "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.[/color]

                  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.
                  [color=blue]
                  >
                  >[color=green]
                  >>I thought
                  >>that it just meant that the colours would be the same in any browser.[/color]
                  >
                  >
                  > No such thing as guaranteed the same colours on every client system.[/color]

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

                  Geoff

                  Comment

                  Working...