— by Nesim


color-mix is a new CSS function that allows you to mix two colors together in any desired color-space and ratio. It’s a powerful tool for creating color themes and palettes.

color-contrast is another new CSS function that allows to compare the contrast ratio between one base color and one or more colors and return the color with the highest contrast ratio. It currently is not supported in any browser :(

CodePens

See this Pen on CodePen.

The following is only supported in Safari behind the color-contrast() flag.

See this Pen on CodePen.

Browser support