Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@teamleader/ui-colors
Advanced tools
Teamleader UI colors is a package that defines the colors that we use in our UI package and projects. The colors are defined as CSS variables and as a JavaScript map (with some helpers).
Our colors are
For each color there are 5 tints.
yarn add @teamleader/ui-colors
or
npm install @teamleader/ui-colors
Import the css file in your css
@import '@teamleader/ui-colors';
The available color variables are
--color-aqua-lightest
--color-aqua-light
--color-aqua
--color-aqua-dark
--color-aqua-darkest
--color-gold-lightest
--color-gold-light
--color-gold
--color-gold-dark
--color-gold-darkest
--color-neutral-lightest
--color-neutral-light
--color-neutral
--color-neutral-dark
--color-neutral-darkest
--color-mint-lightest
--color-mint-light
--color-mint
--color-mint-dark
--color-mint-darkest
--color-ruby-lightest
--color-ruby-light
--color-ruby
--color-ruby-dark
--color-ruby-darkest
--color-teal-lightest
--color-teal-light
--color-teal
--color-teal-dark
--color-teal-darkest
--color-violet-lightest
--color-violet-light
--color-violet
--color-violet-dark
--color-violet-darkest
--color-black
--color-white
The colors are defined as hsl values. For each color the h, s an l value are also available as separate variables. There is also a variable that has the hsl values combined. This way you can do color calculations on them with native css (instead of using postcss-color plugin for example). Some examples:
lighten(12%)
hsl(var(--color-ruby-hsl-h), var(--color-ruby-hsl-s), calc(var(--color-ruby-hsl-l) - 12%))
tint(64%)
hsl(var(--color-ruby-h), var(--color-ruby-s), calc(var(--color-ruby-l) * 1.64))
alpha(12%)
hsl(var(--color-ruby-hsl) / 12%))
import { COLOR, COLORS, TINTS, colorsWithout, tintsWithout } from '@teamleader/ui-colors/constants';
COLOR
: an object that contains the colors as hex values (e.g. COLOR.MINT.DARKEST
).
COLORS
: an array with the color names (['aqua', 'gold', 'neutral', 'mint', 'ruby', 'teal', 'violet']
).
TINTS
: an array with the tint names (['lightest', 'light', 'normal', 'dark', 'darkest']
).
colorsWithout
: a function to get an array of colors without a given array of colors (colorsWithout(['neutral', 'violet])
)
tintsWithout
: a function to get an array of tints without a given array of tints (tintsWithout(['light', 'lightest])
)
[2.0.0] - 2023-04-04
hsl(198deg, 28%, 28%)
becomes hsl(198deg 28% 28%)
). This might be breaking in case you use the colors in combination with alpha (e.g. hsl(var(--color-mint-hsl), 50%)
should become hsl(var(--color-mint-hsl) / 50%)
). We also noticed that postcss was having issues with the previous notation and removing the comma before the alpha, causing the color to be invalid. (@lowiebenoot in #5)FAQs
Teamleader UI colors
The npm package @teamleader/ui-colors receives a total of 8 weekly downloads. As such, @teamleader/ui-colors popularity was classified as not popular.
We found that @teamleader/ui-colors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.