Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
accoutrement-color
Advanced tools
Sass color-palette management by OddBird…
OddBird's Accoutrement toolkits are designed around the idea that code should be meaningful to both humans and machines – opening the door for automation, while improving or maintaining readability. These tools integrate with Herman, our automated living pattern-library generator built on SassDoc.
Other Accoutrement include…
Install the package with npm or yarn:
npm install accoutrement-color
yarn add accoutrement-color
Import the library:
@import '<path-to>/accoutrement-color/sass/color';
Establish your color palette:
$colors: (
// set explicit colors
'brand-pink': hsl(330, 85%, 62%),
'brand-light': #ddf,
'brand-dark': #224,
// reference existing colors
'background': 'brand-light',
'border': 'brand-dark',
// make adjustments as needed, using color functions
'link': 'brand-pink' ('shade': 25%, 'desaturate': 15%),
);
Access your colors from anywhere:
.example {
border-color: color('border');
}
You can also define your colors in smaller maps,
and then add them to the global $colors
variable
using the merge-color()
function,
or add-colors()
mixin.
$brand: (
'brand-pink': hsl(330, 85%, 62%),
'brand-light': #ddf,
'brand-dark': #224,
);
$patterns: (
'background': 'brand-light',
'border': 'brand-dark',
'link': 'brand-pink' ('shade': 25%),
);
// merge everything into the main $colors map…
@include add-colors($brand, $patterns);
We'll also help you calculate WCAG-appropriate color contrasts:
a:hover {
// set a background, and get well-contrasted text
@include contrasted('link');
// or return a contrasting color for use anywhere…
border-color: contrast('background');
}
FAQs
Sass color-palette management and utilities.
The npm package accoutrement-color receives a total of 202 weekly downloads. As such, accoutrement-color popularity was classified as not popular.
We found that accoutrement-color demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.