- From: Rowland Shaw <Rowland.Shaw@seagatesoftware.com>
- Date: Mon, 18 Dec 2000 03:13:50 -0800
- To: "'Ian Brockbank'" <i.brockbank@indigovision.com>, www-style@w3.org
This I like -- whilst on the subject of colours, I'd like to be able to do
things like creating my own names, so I can do:
div .blah { border-color: blah; }
h2 .blah { background-color: blah; }
.blah { color: blah; }
-----Original Message-----
From: Ian Brockbank [mailto:i.brockbank@indigovision.com]
Sent: 18 December 2000 09:04
To: www-style@w3.org
Subject: RE: Relative colors in CSS?
miki.wiik@linuxsupport.to wrote:
> 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}
>
> [snip]
>
> 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
This sounds a nice idea. How about + and - for colours moving to the
next in the "safe" collection - ie +-#33? Or is that too coarse?
Ian
--
IndigoVision Ltd http://www.indigovision.com/
The Edinburgh Technopole, Bush Loan, Edinburgh, EH26 0PJ
Tel: [+44] (0)131 475 7200 Fax: [+44] (0)131 475 7201
Personal: ian@scottishdance.net http://www.scottishdance.net
Feed the world: http://www.thehungersite.com/
> -----Original Message-----
> From: miki.wiik@linuxsupport.to [mailto:miki.wiik@linuxsupport.to]
> Sent: 16 December 2000 21:28
> 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
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <META content="MSHTML 5.50.4522.1800" name=GENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=#ffffff>
> <DIV>Hi.</DIV>
> <DIV> </DIV>
> <DIV>Do existing CSS standards, or ones being planned,
> include a way to define
> colors relatively to their parents? </DIV>
> <DIV> </DIV>
> <DIV>Example:</DIV>
> <DIV> </DIV>
> <DIV>BODY {color : #CCCC99}</DIV>
> <DIV> </DIV>
> <DIV>P {color : darker}</DIV>
> <DIV> </DIV>
> <DIV>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.
> </DIV>
> <DIV> </DIV>
> <DIV>Since almost all other values in CSS can be either
> absolute or relative (to
> their parent), it seems only natural that colors would also. </DIV>
> <DIV> </DIV>
> <DIV>A suggestion for different values: </DIV>
> <DIV>Brighter, decreases all RGB values by, say 5%. </DIV>
> <DIV>Darker, increases all RGB values by 5%. </DIV>
> <DIV>+red, increase Red value by 5%. </DIV>
> <DIV>-red, decrease Red value by 5%</DIV>
> <DIV>++ by 10%. </DIV>
> <DIV>+++ by 15%... </DIV>
> <DIV>and combinations (or shorthand) +red --green +++blue</DIV>
> <DIV> </DIV>
> <DIV>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.</DIV>
> <DIV> </DIV>
> <DIV>Regards, Miki Wiik</DIV>
> <DIV> </DIV></BODY></HTML>
>
Received on Monday, 18 December 2000 06:14:33 UTC