
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
postcss-colornorm
Advanced tools
PostCSS plugin to normalize colors using colornorm to a specific format.
.foo {
background-color: rgb(255 0 0 / 1);
border-color: #ff0000ff;
outline-color: Red;
color: hsla(0, 100%, 50%, 1);
}
.foo {
background-color: hsl(0 100% 50%);
border-color: hsl(0 100% 50%);
outline-color: hsl(0 100% 50%);
color: hsl(0 100% 50%);
}
Defaults to hsl, as this is the most intuitive for humans, and supports all
browsers back to IE9. This can be changed with a setting.
Step 1: Install plugin:
npm install --save-dev postcss postcss-colornorm
Step 2: Check you project for existed PostCSS config: postcss.config.js
in the project root, "postcss" section in package.json
or postcss in bundle config.
If you do not use PostCSS, add it according to official docs and set this plugin in settings.
Step 3: Add the plugin to plugins list:
module.exports = {
plugins: [
+ require('postcss-colornorm'),
require('autoprefixer')
]
}
Or to choose a different color output format, try:
Valid output color formats can be found on the colornorm docs.
module.exports = {
plugins: [
+ require('postcss-colornorm')({ output: "hex" }),
require('autoprefixer')
]
}
FAQs
PostCSS plugin to normalize colors to a specific format
The npm package postcss-colornorm receives a total of 4 weekly downloads. As such, postcss-colornorm popularity was classified as not popular.
We found that postcss-colornorm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.