2.1.2 • Published 1 month ago

@sargamdesign/colors v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

npm.io

Sargam Colors

Color system for designing warm welcoming, caring sites & apps.

[Get Figma variables & styles] [Install VS Code theme]

Installation

Install Sargam Colors from your terminal via npm. Current version is 2.1.2

npm i @sargamdesign/colors

Import vanilla CSS

import "@sargamdesign/colors/dist/themes/light.css";
import "@sargamdesign/colors/dist/themes/dark.css";

To get started quickly, you can use the CDN files.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sargamdesign/colors@2.1.1/dist/themes/light.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sargamdesign/colors@2.1.1/dist/themes/dark.css" />

Usage Example

.button { background-color: var(--button-primary);
          color: var(--text-on-color); }
.button:hover { background-color: var(--button-primary-hover); }
.button:active { background-color: var(--button-primary-active); }

Understanding Project Structure

Here's the file structure of a Sargam colors:

.
├── tokens/
│   ├── global/
│   │   └── global.json
│   └── themes/
│       ├── dark/
│       │   └── dark.json
│       └── light/
│           └── light.json
└── dist/
    └── themes/
        ├── light.css
        └── dark.css

tokens/ serves as the single source of truth, residing within the repository and synchronized with Figma's variables.

For generating various web or app-specific requirements, Style Dictionary is utilized.

To modify colors values or to add new sequential scales, go to tokens/global/. If you want to modify the current theme or create a new one, head to the tokens/themes/. For modifying generated CSS variables, leverage SASS functions and mixins.

Building Themes

git clone https://github.com/SargamDesign/sargam-colors.git
cd sargam-colors
npm i
npm run build

Color Tokens

Text

VariableValue(Light)Value(Dark)Role
--text-primary--silver8--silver1Body copy
--text-primary-alt--silver7--silver3Body copy alt
--text-secondary--silver6--silver5Secondary text color
--text-placeholder--silver5--silver6Placeholder text
--text-on-color--silver1--silver1Text on interactive colors
--text-error--red6--red4Error message text
--text-success--green6--green4Success message text

Support

VariableValue(Light)Value(Dark)Role
--support-error--red5--red4Error
--support-warning--yellow5--yellow4Warning
--support-success--green5--green4Success
--support-info--teal5--teal4Information

Link

VariableValue(Light)Value(Dark)Role
--link--teal6--teal4Primary links
--link-hover--teal7--teal6Hover state for primary links
--link-subtle--teal5--teal5Secondary links
--link-visited--lavender6--lavender4Link visited
--link-muted--silver8--silver1Link muted

Icon

VariableValue(Light)Value(Dark)Role
--icon-primary--silver7--silver3Primary icons
--icon-secondary--silver6--silver5Secondary icons
--icon-disabled--silver5--silver6Disabled state for icons
--icon-on-color--silver1--silver8Icons on interactive colors

Button

VariableValue(Light)Value(Dark)Role
--button-primary--teal5--teal4Primary button background
--button-primary-hover--teal6--teal3Primary button hover
--button-primary-active--teal7--teal2Primary button active
--button-secondary--silver8--silver6Secondary button background
--button-secondary-hover--silver7--silver7Secondary button hover
--button-secondary-active--silver6--silver8Secondary button active
--button-danger--red5--red4Danger button background
--button-danger-hover--red6--red3Danger button hover
--button-danger-active--red7--red2Danger button active
--button-disabled--silver5--silver6Disabled button
--button-disabled-alt--silver4--silver7Disabled button alt

Border

VariableValue(Light)Value(Dark)Role
--border-muted--silver3--silver7Muted borders and separators
--border-default--silver5--silver6Default borders and separators
--border-strong--silver6--silver5Strong borders and separators

Background

VariableValue(Light)Value(Dark)Role
--background--silver1--silver8Default app background
--background-subtle--silver2--silver7Subtle background
--background-selected--silver3--silver6Hovered UI element background
--background-red--red1--red8Subtle red background
--background-yellow--yellow1--yellow8Subtle yellow background
--background-green--green1--green8Subtle green background
--background-teal--teal1--teal8Subtle teal background
--background-lavender--lavender1--lavender8Subtle lavender background
--background-pink--pink1--pink8Subtle pink background

Primitives

Red

VariableValueColor
$red1hsl(0, 100%, 98%)#FFF7F7
$red2hsl(1, 90%, 88%)#FCC6C5
$red3hsl(1, 89%, 71%)#F77472
$red4hsl(1, 89%, 64%)#F55451
$red5hsl(1, 89%, 57%)#F33330
$red6hsl(1, 67%, 48%)#CC2B28
$red7hsl(1, 67%, 34%)#921F1D
$red8hsl(1, 67%, 20%)#571211

Yellow

VariableValueColor
$yellow1hsl(48, 100%, 98%)#FFFDF5
$yellow2hsl(51, 91%, 86%)#FCF2BC
$yellow3hsl(50, 92%, 67%)#F8DE5D
$yellow4hsl(50, 92%, 59%)#F7D737
$yellow5hsl(50, 92%, 51%)#F5CF11
$yellow6hsl(50, 87%, 43%)#CEAE0E
$yellow7hsl(50, 87%, 31%)#937C0A
$yellow8hsl(50, 87%, 18%)#584B06

Green

VariableValueColor
$green1hsl(132, 38%, 97%)#F6FBF7
$green2hsl(139, 45%, 82%)#BDE6CA
$green3hsl(139, 45%, 57%)#5FC37E
$green4hsl(138, 51%, 47%)#3AB55F
$green5hsl(138, 79%, 37%)#14A741
$green6hsl(139, 78%, 31%)#118C37
$green7hsl(138, 79%, 22%)#0C6427
$green8hsl(138, 79%, 13%)#073C17

Teal

VariableValueColor
$teal1hsl(132, 38%, 97%)#F6FBF7
$teal2hsl(177, 43%, 81%)#BBE4E2
$teal3hsl(178, 42%, 54%)#59BCB8
$teal4hsl(177, 55%, 44%)#32ADA7
$teal5hsl(177, 87%, 33%)#0B9D96
$teal6hsl(177, 87%, 28%)#09847E
$teal7hsl(177, 86%, 20%)#075E5A
$teal8hsl(177, 87%, 12%)#043936

Lavender

VariableValueColor
$lavender1hsl(270, 40%, 98%)#FAF8FC
$lavender2hsl(280, 33%, 86%)#DFCFE7
$lavender3hsl(281, 34%, 65%)#B289C5
$lavender4hsl(281, 34%, 57%)#A06EB7
$lavender5hsl(281, 35%, 49%)#8E52A9
$lavender6hsl(281, 35%, 41%)#77458E
$lavender7hsl(282, 35%, 29%)#553165
$lavender8hsl(281, 34%, 18%)#331E3D

Pink

VariableValueColor
$pink1hsl(334, 100%, 99%)#FFF8FB
$pink2hsl(331, 96%, 90%)#FECBE4
$pink3hsl(331, 95%, 75%)#FC82BC
$pink4hsl(331, 96%, 69%)#FC64AD
$pink5hsl(331, 96%, 63%)#FB479D
$pink6hsl(331, 63%, 53%)#D33C84
$pink7hsl(332, 56%, 38%)#972B5E
$pink8hsl(331, 55%, 23%)#5A1A39

Silver

VariableValueColor
$silver1hsl(0, 0%, 100%)#FFFFFF
$silver2hsl(30, 12%, 97%)#F8F7F6
$silver3hsl(43, 13%, 89%)#E7E5E0
$silver4hsl(47, 11%, 84%)#DBD9D2
$silver5hsl(45, 6%, 74%)#C1BFB9
$silver6hsl(48, 2%, 44%)#72716D
$silver7hsl(30, 2%, 17%)#2C2B2A
$silver8hsl(0, 3%, 6%)#100F0F

Websites and apps crafted with Sargam Colors:

License

MIT License, Copyright (c) 2024 Method Black. Brought to you by @planetabhi 🙌

npm version npm.io

2.1.2

1 month ago

2.1.1

5 months ago

2.1.0

5 months ago

2.0.0

1 year ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago