Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
chroma-sass
Advanced tools
Readme
Chroma is a Sass library that manages a project's color names, color variations, and color schemes.
Full documentation is available at http://johnalbin.github.io/chroma/. But here are some quick examples to give you an idea of what Chroma can do.
@import "chroma";
// Define the default color scheme.
$chroma: define-default-color-scheme('Branding color names for use by "functional" color names below.');
// Add colors to the default color scheme.
$chroma: add-colors((
white: #fff,
black: #000,
blue: #0e71b8,
red: #c00,
// Define a primary highlight color that has the value of our "blue" color.
// Note: if blue was specified without quotes, Chroma would interpret that as
// the color keyword blue and not a reference to the "blue" color name.
primary: 'blue',
));
// Create a "functional" color scheme that inherits from the default color scheme.
$chroma: define-color-scheme('functional', 'Colors used by functional parts of the design.');
// Add colors to the functional color scheme.
$chroma: add-colors('functional', (
// Have the "text" color use the hex value given to the "black" color. Even
// though the "functional" color scheme doesn't define "black", it inherits
// from the "default" color scheme where "black" is defined.
text: 'black',
// You can use quoted or unquoted strings to reference other color names.
// Note: color keywords are not considered strings unless they are quoted.
heading: text,
// Have the link color use the primary color.
link: primary,
link-focus: (link lighten 20%), // Set the link-focus color to the "link"
// color passed through the color
// function: lighten([color], 20%)
));
// Create an "alternate" color scheme that inherits from the "functional" color scheme.
$chroma: define-color-scheme('alternate', 'Alternate colors for the site.', $parent: 'functional');
// Add colors to the alternate color scheme.
$chroma: add-colors('alternate', (
primary: 'red',
));
// Set which color scheme should be used by default when calling the color()
// function.
$chroma-active-scheme: 'functional';
.example-ruleset {
h1 {
// Outputs #000.
color: color(heading);
}
a {
// Outputs #0e71b8.
color: color(link);
&:focus,
&:hover {
// Outputs #3ca5f0, which is lighten(#0e71b8, 20%).
color: color(link-focus);
}
.alternate-color-section & {
// Outputs #c00.
color: color(alternate, link);
&:focus,
&:hover {
// Outputs #ff3333, which is lighten(#c00, 20%).
color: color(alternate, link-focus);
}
}
}
}
Install using one of the following methods:
npm install --save-dev chroma-sass
bower install --save-dev chroma
gem install chroma-sass
require "chroma-sass"
to your config.rb file.bundle inject chroma-sass '~> 1.0'
See Chroma’s online documentation for more information.
Available under the GPL v2 license. See LICENSE.txt.
FAQs
Chroma is the Sass color manager, managing color names, variations, and color schemes.
The npm package chroma-sass receives a total of 201 weekly downloads. As such, chroma-sass popularity was classified as not popular.
We found that chroma-sass 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.