← Back to release summary

Media Queries: inverted-colors feature

Category
CSS
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
None

WPT details: https://wpt.fyi/results/css/mediaqueries/inverted-colors.html

Summary

Adds the `inverted-colors` media feature, an indication that the user agent or underlying operating system has forcibly inverted all colors, not a request to do so. This is sometimes provided as a simple accessibility feature, allowing users to switch between light-on-dark and dark-on-light text. Valid options are 'inverted' or 'none'.

Motivation

This is an indication that the user agent or underlying operating system has forcibly inverted all colors, not a request to do so. This is sometimes provided as a simple accessibility feature, allowing users to switch between light-on-dark and dark-on-light text. However, this has unpleasant side effects, such as inverting pictures, or turning shadows into highlights, which reduce the readability of the content. This feature will allow authors to counteract this.

Standards & signals

Ecosystem

Samples: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/inverted-colors#examples

View on chromestatus.com