dynamic-range-limit-mix() CSS Function
The dynamic-range-limit-mix() function creates a custom brightness limit for HDR content by mixing the keywords of dynamic-range-limit.
Description
The dynamic-range-limit-mix() CSS function creates a custom brightness limit for high dynamic range (HDR) content by mixing two or more values of the dynamic-range-limit property in chosen proportions. On HDR screens, HDR images and videos can be much brighter than normal page white, which can look harsh next to standard content. dynamic-range-limit lets authors cap that brightness, and this function allows values in between the predefined keywords.
The keywords being mixed are standard (HDR content is limited to the brightness of standard white), constrained (some extra brightness is allowed, but limited) and no-limit (HDR content may use the full brightness of the screen). Each keyword in the mix is paired with a percentage, and the percentages are normalized if they do not add up to 100%. For example, dynamic-range-limit-mix(standard 70%, no-limit 30%) allows a little HDR headroom without the full effect.
The function has no effect on standard dynamic range (SDR) screens or on SDR content. It is supported in Chromium-based browsers.
/* Gallery thumbnails: a touch of HDR, not the full effect */
.thumbnail img {
dynamic-range-limit: dynamic-range-limit-mix(standard 70%, no-limit 30%);
}
/* Full brightness when the image is opened */
.lightbox img {
dynamic-range-limit: no-limit;
}
Syntax
dynamic-range-limit-mix() = dynamic-range-limit-mix( [ <'dynamic-range-limit'> && <percentage [0,100]> ]#{2,} )Values
- <'dynamic-range-limit'>A dynamic-range-limit value: standard, constrained, no-limit, or another dynamic-range-limit-mix() function.
- <percentage>How much of that value to use, from 0% to 100%. The percentages are normalized so they add up to 100%.
Example
Browser Support
The following information will show you the current browser support for the CSS dynamic-range-limit-mix() function. Hover over a browser icon to see the version that first introduced support for this CSS function.
Desktop





Tablets & Mobile





