transparancy and RGB()

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 UTC