css3-colors

1.0.0 • Public • Published

css3-colors

Css3-colors is a package that helps you with color management, css3-colors brings variable classes with the colors that have the package scss-colors

To see all the colors and their shades, click here

NPM Version Package License NPM Downloads Coverage

🎉 Colors Demo

Preview live click here

📦 Installation

Before using, we have to install the package via npm or download it directly !

# To install 
npm install --save css3-colors

▶️ Usage

To use it is very simple, first you have to import the css file into your main file of html.

When you install or download the package you will have two css files, index.css and index.min.css

  • File index.css this file is customizable as it is not mined.
  • File index.min.css this file brings all the classes with the colors, but unlike the other one, this one will come mirified, that is to say to use it in production.
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>css-colors - Created by Yoni Calsin</title>
 
      <!-- This way you'll have to care -->
      <link rel="stylesheet" href="dist/index.css" />
   </head>
   <body>
      <!-- Here he adds all his html code -->
   </body>
</html>

But if you want to import it from javascript, you will have to do it this way:

import '~css3-colors/dist/index.css';

🎨 Color classes

To be able to use the classes are as follows.

The colors are iterated from a map !

/**
*  Red Colors
**/
$red: (
   'base'#f44336,
   'lighten-5'#ffebee,
   'lighten-4'#ffcdd2,
   'lighten-3'#ef9a9a,
   'lighten-2'#e57373,
   'lighten-1'#ef5350,
   'darken-1'#e53935,
   'darken-2'#d32f2f,
   'darken-3'#c62828,
   'darken-4'#b71c1c,
   'accent-1'#ff8a80,
   'accent-2'#ff5252,
   'accent-3'#ff1744,
   'accent-4'#d50000,
);

For example we will use the color red, and if you want more simply add the classes of .lighten-{number} or .accent-{number}.

<div class="red">
   <h1 class="blue-text">Css3-colors</h1>
</div>

To give colors to the texts, it is also very simple, you can use the same classes, you will have to add the word -text to the end

<h1 class="red-text lighten-3">Red title - lighten-3</h1>

⭐ Support for

css3-colors is an open source project licensed by MIT. You can grow thanks to the sponsors and the support of the amazing sponsors. If you want to join them, contact me here.

🎩 Stay in touch

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Yoni Calsin

💻 🐛 📖 📝

This project follows the all-contributors specification. Contributions of any kind welcome!

📜 License

css3-colors is MIT licensed.

Readme

Keywords

Package Sidebar

Install

npm i css3-colors

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

68.2 kB

Total Files

4

Last publish

Collaborators

  • yonicb