Get all the colors that are included in CSS.
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 Type | Format |
---|---|
hex | string |
rgb | [number, number, number] |
hsl | [number, number, number] |
hsv | [number, number, number] |
hwb | [number, number, number] |
cmyk | [number, number, number, number] |
xyz | [number, number, number] |
lab | [number, number, number] |
lch | [number, number, number] |
keyword | string |
ansi16 | number |
ansi256 | number |
hcg | [number, number, number] |
apple | [number, number, number] |
The CLI allows you to view a color and all its different formats.
Format: colors (hex/keyword)
This project is licensed under the MIT License.