
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
postcss-colour-functions
Advanced tools
PostCSS plugin for Sass-like colour functions.
..
npm install postcss-colour-functions --save
Then just require it in whatever task runner you prefer like so:
var colourFunctions = require('postcss-colour-functions');
..
The plugin expects colours to be entered in either RGB/A or hexidecimal format. No HSL is usable as yet. It does also accept some basic CSS colour codes, but the list is by no means exhaustive.
Darkens a colour by a specific amount, specified either as a decimal or percentage:
/* so this */
.element{
color: darken(#00b, 20%); // you could also use '0.2' instead of '20%'
}
/* becomes this */
.element{
color: rgb(0,0,150);
}
The same as darken
, except it tints the colour as opposed to shading it:
/* so this */
.element{
color: lighten(#00b, 20%); // you could also use '0.2' instead of '20%'
}
/* becomes this */
.element{
color: rgb(51,51,201);
}
Specify an opacity for a given colour. This returns an rgba
value:
/* so this */
.element{
color: opacity(#00b, 20%); // you could also use '0.2' instead of '20%'
}
/* becomes this */
.element{
color: rgba(0,0,187,0.2);
}
..
MIT
If you have any improvements I'm super keen to pull them in.
FAQs
PostCSS plugin with some useful, Sass-like colour functions
The npm package postcss-colour-functions receives a total of 23 weekly downloads. As such, postcss-colour-functions popularity was classified as not popular.
We found that postcss-colour-functions 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.