Re: Relative colours in CSS?

As a developer, I've been wishing for a way of assigning color properties to
an identifier and being able to refer to that throughout my stylesheet.

I'm not so concerned with creating "relative" color values by increasing or
decreasing RGB or HSV values because, as has been mentioned, the creation of
a usable color scheme so seldom involves simply increasing and decreasing
hues.  That's most often the apparent effect, but the actual harmonizing of
the colors is more complicated.

However, I'd like to voice some more support for the following proposal--to
include at the very least the idea of defining a color name and assigning it
properties.

----- Original Message -----
From: "Clover Andrew" <aclover@1VALUE.com>
> The obvious syntax for this would be an at-rule to extend/replace
> the built-in colour names, eg.
>
>   @color {
>     color-name: skin;
>     color-base: rgb(253, 210, 189);
>   }
>

This is the part that I've been dying for

> I suppose one might also be able to fit the 'relative colours'
> idea into this sort of syntax, something like:
>
>   @color {
>     color-name: bruise;
>     color-base: skin;
>     color-value: darker; /* or -n% or an absolute value */
>     color-hue: 153;  /* IMO HSV is a more useful model than RGB */
>   }
>

Jeff Coleman

Received on Thursday, 21 December 2000 00:13:41 UTC