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

Re: Relative colors in CSS?

From: <miki.wiik@linuxsupport.to>
Date: Wed, 20 Dec 2000 01:01:51 +0200
Message-ID: <007701c06a0f$af270e80$51f4d5d4@eleanora>
To: "w3.org mailing Style" <www-style@w3.org>
Many thanks for all the replys posted. 

There's been some really good ideas presented, I try not to repeat them, but instead continue on the lines of the ideas presented.

Besides being a great help for developers, I believe that relative colors could be useful for the user, since it would more accurately convey the designers original intention.

This might be taking the longer route, but I think it's important to define just what I'm talking about. Bear with me.

IMO CSS allows the designer two different types of styling: 

1.) A more traditional approach were the designer has total control of the layout. Translated into CSS this means using absolute values for positioning, size, coloring, etc. Allthough CSS icludes the possibility for this type of designing, much of it can be achieved using older existing techniques, e.g. tables.
2.) A scalable/relative design. Instead of defining absolute measures the designer only defines the internal proportions and relations of the elements included. E.g. parent-child inherited values, %, em, etc. 

Relative design allows the designer to specify a certain layout that is independent of the medium in which it is viewed. (I believe this was one of the driving forces behind creating CSS in the first place). It is then up to the UA to adjust this design according to the limitations of the output-medium used (screen size, resolution, colors, installed fonts, disabilites, user style sheets, etc.) 

In other words. When designing a (relative)layout, the designer should not create an absolute layout, but instead only present the proportions and relations of the different elements contained in the layout, so that they can be preserved allthough the medium in which they are presented changes. 

The problem with colors is that there is no other way to define them than absolute. When assigning colors, most designers do not have a particular (absolute) color in mind, but something more like a theme (or set) of different nuances of the same color or colors. 

To present this set the author has to rely on defining absolute values for the colors. Especially when using the safe-palette, this can not always be achieved as there is only a very limited amount of colors to choose from. In effect, the original theme is not presented to the viewer.

Since the color-depth of the output-medium is not known, the designer should therefore have a way of defining this set as relative values between the  different colors, rather than absolute values. It would then be up to the UA to present this theme using the amount of colors the output-medium can present.

In cases like user-stylesheets this would be very helpful. 

Consider a case with a user style sheet:

Body { background-color : white ! important;
            color : black ! important }

This could easily mess up the color scheme, since the user has no way to define all the colors of a page (especially if a color is assigned to a class). 

But, if the colors would be presented as relative values, derived from the Body, the theme would still be presented.

I hope this gives a clearer picture of what I'm looking for. Something as abstract as color-themes isn't that easy to describe. 

Regards, Miki Wiik
Received on Tuesday, 19 December 2000 17:52:49 GMT

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