W3C home > Mailing lists > Public > www-style@w3.org > December 2000

RE: Relative colors in CSS?

From: Manos M. Batsis <manosb@profile.gr>
Date: Mon, 18 Dec 2000 01:42:30 +0200
To: <www-style@w3.org>
Cc: "Miki. Wiik@Linuxsupport. To" <miki.wiik@linuxsupport.to>
Message-ID: <HOEKJKBDBAHOEMPDNCJDCEDDCDAA.manosb@profile.gr>
I think this would be extremely useful. This would actually drop a style's
developing period by 50% for me since I usually start from one of my
templates.
VERY developer-friendly idea ;-)

Manos
  -----Original Message-----
  From: www-style-request@w3.org [mailto:www-style-request@w3.org]On Behalf
Of miki.wiik@linuxsupport.to
  Sent: Saturday, December 16, 2000 11:28 PM
  To: w3.org mailing Style
  Subject: Relative colors in CSS?


  Hi.

  Do existing CSS standards, or ones being planned, include a way to define
colors relatively to their parents?

  Example:

  BODY {color : #CCCC99}

  P {color : darker}

  The reason I'm looking for this sort of solution is that quite often when
designing pages I use a set of colors that are more or less variations of
the same basic color. The background is a light tone, the following layer
(div) a bit darker, the following even darker plus a bit more red, etc.

  Since almost all other values in CSS can be either absolute or relative
(to their parent), it seems only natural that colors would also.

  A suggestion for different values:
  Brighter, decreases all RGB values by, say 5%.
  Darker, increases all RGB values by 5%.
  +red, increase Red value by 5%.
  -red, decrease Red value by 5%
  ++ by 10%.
  +++ by 15%...
  and combinations (or shorthand) +red --green +++blue

  Having a way to define relative colors would IMO improve scalability (the
author would only have to define one starting colour, that could easily be
replaced by User stylesheets) and thus increase overall flexibility.

  Regards, Miki Wiik
Received on Sunday, 17 December 2000 18:42:41 GMT

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