W3C home > Mailing lists > Public > www-style@w3.org > July 2014

[css-color] Exposing "brand"/"accent" color

From: Bogdan Brinza <bbrinza@microsoft.com>
Date: Wed, 9 Jul 2014 01:50:22 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <ff5c0a3f46a04975a834f176c6f48f49@CH1PR03MB610.namprd03.prod.outlook.com>

There is a concept of "brand"/"accent" color on many operating systems that web apps / sites want to use in CSS (we in IE get requests often enough): 

- On Windows Phone 7/8 this is called "Accent color" and you can use this in browser with CSS color highlight. 
- On Mac OS X this is called "Highlight color" and you can use this in browser again with CSS color highlight.
- Windows 8/8.1 has "Accent color" and "Background color" that are NOT exposed in CSS (CSS highlight gives hardcoded value), but you can get this through WinRT with JavaScript in Windows web applications (WWAs).
- I can't really comment iOS / Android / Chrome OS - perhaps somebody can add this information if it's valuable. Brief investigation suggest there is no customizable system accent color, but system accent color is present.

Looking at css-color history there was a concept of "flavor" color (http://www.w3.org/TR/2003/CR-css3-color-20030514/#flavor) that is capturing something different, but close enough to the accent /brand color present in Windows/Windows Phone/Mac OS X. The existing definition focused on hardware, and modern concepts come from software color accents. 

With the requests to implement Windows accent color in IE coming our way quite frequently from internal and external partners, we're feeling the system specific CSS color concept is starting to build up and is worth revisiting (though it would be nice to avoid X11 / system color deprecated in CSS). While it's possible to expose Windows accent color as it's done on Windows Phone / Mac OS X as CSS highlight - this has few drawbacks - since CSS highlight color is ubiquitous you can't really provide your own specific brand color on systems that don't have concept of accent/brand color.  

Another implication is that in all systems that have this concept exposed to CSS (Windows Phone / Mac OS X) the color is updated whenever user picks new value in system settings. It would make sense to expose corresponding event to listen to system accent color / theme changes and be able to react if necessary (perhaps to find a matching secondary color).

Internet Explorer can always follow existing implementations and expose Windows accent color through CSS highlight, but that really feels like fitting modern concept into existing one. 

It's interesting to get WG opinion on this topic and address this in css-color module.
Received on Wednesday, 9 July 2014 01:50:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC