RE: Relative colors in CSS?

"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). "

This is a good point, but when users start messing with thier settings,
responsibility shifts from the designer/developer to the user.  No matter
how well designed your pages are, a user can always mess it up with
preferences; and if they can alter those preferences in the first place,
then they can change them again to make a page readable.

I think that relative colors is a seductive idea from a developers
perspective because you think of all the time you will save coding.  I might
suggest that using a simple search/replace could have the same convenience
for making multiple color schemes.  Relative colors just wont work.  If
#ffccff matches with #ffcccc; that doesn't mean that #eebbee will match
#eebbbb.  Finding a  good color scheme is tricky business.

The only legitimate reason (that i can think of) to let a user alter a page
style is for special needs, such as colorblindness or poor eyesight.  If
some random yahoo changes their page background color to navy blue and
forces pages to use that, then complains about pages showing up unreadable;
I have approximately zero sympathy.

 - B Morris

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org]On Behalf Of
miki.wiik@linuxsupport.to
Sent: Tuesday, December 19, 2000 6:02 PM
To: w3.org mailing Style
Subject: Re: Relative colors in CSS?


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 Wednesday, 20 December 2000 08:41:42 UTC