color-mix(in srgb, black, white 80%)
color-mix(in srgb, black 80%, white)
color-mix(in srgb, rgb(255, 127, 0) 80%, rgb(0, 127, 0))
For now, only srgb is supported (we do not support other color functions/spaces anyway).
Related Issue
None
Motivation and Context
Main motivation are gradients and emulated color stops: SVG gradients do not support mid-points. So those have to be emulated. The issue is when we use custom properties for the colors. The emulated color stops currently need to be of actual colours. However, we rather want the color stops to "get computed" on the fly.
Add support for CSS function
color-mix()
Description
This allows blending 2 colors with each other:
For now, only
srgb
is supported (we do not support other color functions/spaces anyway).Related Issue
None
Motivation and Context
Main motivation are gradients and emulated color stops: SVG gradients do not support mid-points. So those have to be emulated. The issue is when we use custom properties for the colors. The emulated color stops currently need to be of actual colours. However, we rather want the color stops to "get computed" on the fly.
Here an example of the purpose:
(Warning: The above gradients are actually not the same. Only meant for demonstration purposes.)
How Has This Been Tested?
Via unit testing: Added googletest as actual unit testing system to CircleCI.
Screenshots (if appropriate):
Types of changes
Checklist: