RE: Relative colors in CSS?

"I don't think users have the ability to change color settings for a web
site through their
browser yet..."

In IE users can specify a stylesheet to use which overrides page styles.  So
if you are colorblind or have low vision, you could have a css file that has
large text or black-on-white text.  Other browsers, such as Opera, allow
more control over presentation for the user.

"As for the portal example, the main benefit that made me think of it is
speed, since all
the areas will work with the same stylesheet while having a different
scheme. All that
dependent on a couple of in-line rules that will have effect on the linked
stylesheet. I
don't know about you but the idea fascinates me."

It would be a good shortcut, but I don't think that it would be very
meaningful.  If you want to use variables (or something with that effect,
such as a "base color") then some sort of server side scripting is the
answer.  My understanding is that HTML and CSS are designed with certain
limitations and boundaries for reasons.  I think that what we are discussing
here wouldn't be the responsibility of the browser, but the responsibility
would be on your end.  You can accomplish all of this with standard HTML/CSS
and some server-side programming.

"As for css editor programs, do you use HTML editors to make your pages? I
don't think so."

I'm not quite sure what you are asking here.  Do I use wysiwyg? no.  But I
do use tools to help create html; and as tools get better, I don't think
that many of us will be creating style sheets by hand.  I think that these
tools would bear responsibility for this sort of easy maintenance of css
files.

 - Ben Morris




-----Original Message-----
From: Ben Morris [mailto:bmorris@activematter.com]
Sent: Tuesday, December 19, 2000 3:51 PM
To: Manos M. Batsis
Subject: RE: Relative colors in CSS?


In such a portal with many areas, the work put into re-writing style sheets
would be quite small compared to the rest of the work put into that site.
If the demand for this type of thing would grow, I would think that css
editor programs would be better fit to do this type of editing.

As for accessibility, users can already use options in thier browser or a
browser more tailored toward them to tweak thier display.  You can have your
own style sheet to use instead of what is on the page.

-----Original Message-----
From: Manos M. Batsis [mailto:manosb@profile.gr]
Sent: Tuesday, December 19, 2000 4:29 AM
To: Ben Morris
Cc: www-style@w3.org
Subject: RE: Relative colors in CSS?



I do share your point of view but consider these cases.

I usually make pages with a small number of colors while I find myself using
colors that
could be defined "relatively" the way Miki suggested. So, imagine a portal
with many
subject areas. You could drop the multiple CSS files just by stating the
base color in the
<head> part, changing all the scheme while the color *relationships* remain
the same so the
"feel" stays the same and the code drops to minimum.

Or (ok I'm going too far here but...) you could use this in case of  "color
blindness" if
my English are right, by giving the user the option to change dynamically
the whole scheme
by changing one rule. Not bad for accessibility considerations.

So I should rephrase to "It would be extremely useful to have this choice".

Regards,
Manos


-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org]On Behalf Of
Ben Morris
Sent: Monday, December 18, 2000 3:06 PM
To: Manos M. Batsis; www-style@w3.org
Cc: Miki. Wiik@Linuxsupport. To
Subject: RE: Relative colors in CSS?


As a developer, I don't think that this is where the solution should be.
This would be best done (in my view) by a style sheet editor application or
a css generating script.  I have recently made a page that will create a
stylesheet based on several variables.  So now I can specify a font face,
base font size, and several colors; and the .css file will be generated.

Besides, even if you have to change 100 lines on a .css file, that is OK
considering that you can have 100% control over the colors that will be
chosen, instead of the browser picking a color.  Colors are a pretty
delicate balance when it comes to matching each other.

Just my thoughts,
- Ben Morris


-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org]On Behalf Of
Manos M. Batsis
Sent: Sunday, December 17, 2000 6:43 PM
To: www-style@w3.org
Cc: Miki. Wiik@Linuxsupport. To
Subject: RE: Relative colors in CSS?


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 Tuesday, 19 December 2000 10:32:49 UTC