W3C home > Mailing lists > Public > www-style@w3.org > March 2015

[css-color] copying a value from another color

From: Andrew VanWagoner <thetalecrafter@gmail.com>
Date: Thu, 5 Mar 2015 18:18:50 -0700
Message-ID: <CAECGhiykMe8HLdVm-SHAAj=8H2dNL=g1CmdwiADBiNV-O2VzsQ@mail.gmail.com>
To: www-style@w3.org
It would be very useful if color adjusters could take a color parameter,
instead of just a number or percentage, and simply take the color's value.

For example, trying to express a color with proper contrast from a
background color, and using the hue of known color:

color(var(--background) contrast(0%) hue(var(--color-theme)))

side note: contrast(100%) is always either black or white, and I would
guess would be used a lot less than contrast(0%) which finds the minimum
contrasting color. It's odd in my mind that the default if omitted is 100%.
Received on Saturday, 7 March 2015 17:06:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC