W3C home > Mailing lists > Public > www-style@w3.org > August 1996

transparancy and RGB()

From: Hakon Lie <howcome@w3.org>
Date: Thu, 15 Aug 1996 15:26:23 +0200
Message-Id: <199608151326.PAA26275@www4.inria.fr>
To: Chris Josephes <cpj1@winternet.com>
Cc: www-style@w3.org
Chris,

 > Also, in the latest version of the CSS spec, it dosn't show the 
 > possibility of specifying RBG values in hexadecimal anymore?  Was this an 
 > accidental ommision, or was it felt that too many ways of specifying 
 > colors would be confusing?

Accidental -- one paragraph has been left out. Section 6.3 should read:

  6.3    Color units
  
  A color is a either a color name or a numerical RGB specification.
  
  The suggested list of color names is: aqua, black, blue, fuchsia,
  gray, green, lime, maroon, navy, olive, purple, red, silver, teal,
  white, and yellow. These 16 colors are taken from the Windows VGA
  palette and will also be used in HTML 3.2. The RGB values for these
  color name are not defined in this specification.
  
    BODY {color: black; background: white }
    H1 { color: maroon }
    H2 { color: olive }
  
  The RGB color model is being used in numerical color specifications.
  There are different ways to specify red:
  
    EM { color: #f00 }              /* #rgb */
    EM { color: #ff0000 }           /* #rrggbb */
    EM { color: rgb(255,0,0) }      /* integer range 0 - 255 */
    EM { color: rgb(255,0,0) }      /* integer range 0 - 255 */
    EM { color: rgb(100%, 0%, 0%) } /* float range 0.0% - 100.0% */
  
  Note that the three-digit RGB notation (#rgb) is converted into
  six-digit form (#rrggbb) by replicating digits, not by adding zeros.
  For example, #fb0 expands to #ffbb00.
  
  RGB colors are specified in the sRGB color space as defined in the
  appendix of [6]. UAs should make reasonable efforts to render colors
  accurately according to the sRGB specification.
  
  Values outside the numerical ranges should be clipped. The three rules
  below are therefore equivalent:
  
    EM { color: rgb(255,0,0) }       /* integer range 0 - 255 */
    EM { color: rgb(300,0,0) }       /* clipped to 255 */
    EM { color: rgb(110%, 0%, 0%) }  /* clipped to 100% */


Regards,

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/people/howcome  howcome@w3.org
Received on Thursday, 15 August 1996 09:26:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:45 GMT