Re: applet colors
by gchurchman(at)medseek.com (Gary Churchman)
|
Date: |
Thu, 13 Apr 2000 09:26:33 -0700 |
To: |
<graham(at)micron.net>, <hwg-techniques(at)mail.hwg.org> |
References: |
micron |
|
todo: View
Thread,
Original
|
|
Sorry, I should have given a longer explanation the other day when I
answered "Try 255 or 255,255,255." This combination would give the white
color specified by the question. To explain how the numbering system works,
I offer the following.
The 256 color palette (16 by 16 color grid [16 x 16 = 256]) uses the
(decimal) numbers from 0 (black) to 255 (white) with all of the other shades
in between. This numbering scheme implies the total absence of color is
black, and the complete amalgamation of all colors is white (or, color is
the portion of light reflected back to the eye, no light reflection appears
black).
Some Java applets allow you to pick a color from the 256 color palette and
only require you to enter a single numeric value (0 [black] to 255 [white])
while others are written to require a separate value each for red, green and
blue (RGB) which looks like 0,0,0 for black and 255,255,255 for white. This
allows the user to select from 16.8 million colors (256 x 256 x 256 =
16,777,216) instead of being limited to 256. The first number represents
red (255[R]) second green (255[G]) and the last blue (255[B]), hence RGB
values.
Hexadecimal is similar to the decimal (0,0,0) format since it gives a
separate value for each of the primaries (red, green , blue [RGB]) in base
16 {set of integers - 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f}. This numbering
system is consistent with the 16 by 16 color grid. "Hex" values (e.g.,
333399 is dark blue, FFFFFF is white) are sometimes called for in Java
applets, but I see decimal color combinations far more frequently. When
used as RGB, "hex" makes it possible to use the same 16.8 million color
palette ([16 x 16] x [16 x 16] x [16 x 16] = 16,777,216). The (#) pound
sign precedes the "hexadecimal" value when it is used in HTML.
Go to http://the-light.com/colclick.html to see a neat applet that allows
you to see how all of these numeric combinations equate to colors. Browser
safe colors just means limited to 256 or less colors which is rendered more
or less alike in all browsers. Video cards and monitors render colors
differently too, so this is not necessarily always browser safe, but it is
closer to safe than when using the larger palettes.
Gary Churchman
Director, Production and Design
MedSeek
gchurchman(at)medseek.com
www.medseek.com
----- Original Message -----
From: <graham(at)micron.net>
To: <hwg-techniques(at)mail.hwg.org>
Sent: Wednesday, April 12, 2000 3:53 PM
Subject: applet colors
> Heya Rick;
>
> In my experience, our applets support the standard hex numbers; i.e.,
> <PARAM NAME=BGCOLOR VALUE=FFFFFF> inserted in the HTML renders a white
> background.
>
> . . not a Java programmer, though.
>
> M. Graham
>
>
>
>
> >From: Rick <altwd(at)earthlink.net>
> >Subject: Applet colors
> >
> >I have an applet with a bacground color set to "0" which is black. Does
> >anyone know where I can get the chart or instructions on the proper
> >numbers in an applet for different colors? I am trying to change this
> >one to white, but I'd also like to know how this numerical scale works.
> >Thanks. Rick
>
>
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA