Gives name to every color.


red in other forms:

#ff0000, rgb(255, 0, 0), hsl(0, 100%, 50%)

Using in CSS:

a {
  color: red;
  text-decoration: none;

New: Everycolor chart!


A Japanese engineer said, what if all color codes are given their own names? Here it is! The everycolor package is here to give distinct names to all the 16,777,216 colors in the RGB namespace.


npm install everycolor

The everycolor package provides two functions, fromRGB and toRGB. These functions are useful for conversion between RGB values and color names.

import { fromRGB, toRGB } from "everycolor";

console.log(fromRGB(255, 0, 0)); // "red"
console.log(fromRGB(255, 128, 128)); // "redhalfwhite"

console.log(toRGB("red")); // { r: 255, g: 0, b: 0 };
console.log(toRGB("readhalfwhite")); // { r: 255, g: 128, b: 128 }


We also provide a PostCSS plugin everycolor/postcss. With this plugin, you can use Everycolor names in your CSS. Check out how nice it looks.


All kinds of help, including bug reports, bug fixes and also name change suggestions, are welcome.