1.0.5 • Published 3 years ago

@hiimjustin000/colors-css v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

colors-css

Get all the colors that are included in CSS.

npm npm David David GitHub
NPM

Colors

All CSS colors are properties of an initiated Colors class, which takes the type of color to use. For example:

const Colors = require("@hiimjustin000/colors-css");
const colors = new Colors("hex");
colors.red; // FF0000
Colors.color("DEADED").hex; // DEADED
const Colors = require("@hiimjustin000/colors-css");
const colors = new Colors("rgb");
colors.red; // [255, 0, 0]
Colors.color("DEADED").rgb; // [222, 173, 237]

The list of color types that are included are:

Color TypeFormat
hexstring
rgbnumber, number, number
hslnumber, number, number
hsvnumber, number, number
hwbnumber, number, number
cmyknumber, number, number, number
xyznumber, number, number
labnumber, number, number
lchnumber, number, number
keywordstring
ansi16number
ansi256number
hcgnumber, number, number
applenumber, number, number

CLI

The CLI allows you to view a color and all its different formats.

Format: colors (hex/keyword)

License

This project is licensed under the MIT License.