
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@csstools/postcss-gamut-mapping
Advanced tools
npm install @csstools/postcss-gamut-mapping --save-dev
PostCSS Gamut Mapping lets you use wide gamut colors with gamut mapping for specific displays following the CSS Color 4 Specification.
When out of gamut colors are naively clipped the result can be radically different.
A saturated and bright color will be much darker after clipping.
To correctly adjust colors for a narrow gamut display, the colors must be mapped.
This is done by lowering the chroma in oklch until the color is in gamut.
Using the @media (color-gamut) media feature makes it possible to only use the wide gamut colors on displays that support them.
p {
background-color: oklch(80% 0.05 0.39 / 0.5);
color: oklch(20% 0.234 0.39 / 0.5);
border-color: color(display-p3 0 1 0);
}
/* becomes */
p {
background-color: oklch(80% 0.05 0.39 / 0.5);
color: rgba(48, 0, 20, 0.5);
border-color: rgb(0, 247, 79);
}
@media (color-gamut: rec2020) {
p {
color: oklch(20% 0.234 0.39 / 0.5);
}
}
@media (color-gamut: p3) {
p {
border-color: color(display-p3 0 1 0);
}
}
Add PostCSS Gamut Mapping to your project:
npm install postcss @csstools/postcss-gamut-mapping --save-dev
Use it as a PostCSS plugin:
const postcss = require('postcss');
const postcssGamutMapping = require('@csstools/postcss-gamut-mapping');
postcss([
postcssGamutMapping(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
FAQs
Gamut map css colors to fit display specific gamuts
The npm package @csstools/postcss-gamut-mapping receives a total of 582,139 weekly downloads. As such, @csstools/postcss-gamut-mapping popularity was classified as popular.
We found that @csstools/postcss-gamut-mapping demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.