W3C home > Mailing lists > Public > www-style@w3.org > October 2006

Re: CSS color palettes

From: Orion Adrian <orion.adrian@gmail.com>
Date: Mon, 30 Oct 2006 15:35:18 -0500
Message-ID: <abd6c8010610301235m43d24c67y83a2210d913cf2d3@mail.gmail.com>
To: www-style@w3.org

What it seems like you need is

E.class {
   color: accent1;
   background-color: accent4;
}

E#id {
  color: accent2;
  background-color: accent3;
}

to create color constants where you could define what accent1,
accent2, ... are. This has been requested many times already and each
time rejected.

The preferred approach is as follows. At the end of your document or
in a colors.css you put rules like the following:

div.header, span.highlighted, #keywords {
    color: #800; /* accent 1 */
}

div.header, span.highlighted {
    background-color: #004; /* accent 3 */
}

#keywords, #footer {
    background-color: #006; /* accent 4 */
}

You basically declare everything that shares a foreground color and
everything that shares a background color and make a rule for each
grouping that shares a color. It's not as elegant as a palette, but it
works with the current system mostly.
Received on Monday, 30 October 2006 20:35:28 GMT

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