JSPM

color-name-list

3.38.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19955
  • Score
    100M100P100Q142556F
  • License MIT

long list of color names

Package Exports

  • color-name-list

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-name-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

17184 color-names

GitHub release npm version npm Travis color count Buy Me a Coffee at ko-fi.com

A handpicked list of 17184 unique color names from various sources and thousands of user submissions. Try it yourself or read the full list.

The names of color function like a thread attached to a frightfully slender needle, capable of stitching together our most delicate emotions and memories. When the needle hits the target, we feel either pleasure or empathy. Kenya Hara – White

About 📋

The aim of this project is to create as large a list of color names as possible. We've merged various lists, modified the names when there were duplicates with different hex values, and shifted the colors a bit when there were identical colors with different names.

Submit a color via form 🌈 / or twitter 🐦

Make sure to read the naming rules before you contribute!

color count: 17184 🎉

(~0.10% of all RGB Colors)

Color distribution 🛰

When coming up with new color names, it is vital to know what spots in a certain color-space are crowded and where there is still room for new colors. For example: Our API returns the closest RGB color to a given HEX value. To avoid too many colors snapping to the same name, we aim to distribute the colors evenly in the color space: Visualization

PS: You can choose between different color spaces on the bottom right.

Usage 📖

Installation Node.js 📦

npm install color-name-list --save

or yarn add color-name-list

CDN 🌍 JSON / CSV / YML / JS

API 🃏

https://api.color.pizza/v1/{{hexvalue without the #}},{{more comma separated values}}

Single Color

curl https://api.color.pizza/v1/212121

{
  "colors": [{
    "name": "Lead",
    "hex": "#212121",
    "rgb": {"r":33, "g":33, "b":33},
    "distance": 0, // its an exact match
    "luminance": 22.062320231562225,
    "requestedHex": "#212121",
  }]
}

Multiple Colors

curl https://api.color.pizza/v1/212121,060606,ff0012,550055,123456

All Named Colors

curl https://api.color.pizza/v1/

In this case colors is not an object but an array of objects sorted by color-name

Usage JS ⌨

Exact Color

import namedColors from 'color-name-list';

let someColor = namedColors.find(color => color.hex === '#ffffff');
console.log(someColor.name); // => white

let someNamedColor = namedColors.find(color => color.name === 'Eigengrau')
console.log(someColor.hex); // => #16161d

Closest Named Color

Since there are 16581375 possible RGB colors, you might use a library such as color-octree to help you find the the closest named color.

import namedColors from 'color-name-list';
import * as colorOctree from 'color-octree';

colorOctree.add(namedColors); // .add expects an array of {name, hex} objects, like color-name-list provides
console.log(colorOctree.closest('#f1c1d1')); // => Fairy Tale

Note: If you are looking for something visually more accurate, you can use a library returning the color with the closest DeltaE based on the Lab color-space.

Building 🔨

npm install && npm run build

See package.json for more.

Sources 🗒

Sources: Names 📇

Sources: Color 🎨

Contributors 🦑

Disclaimer 👮🏾‍

In the process we try to remove all names that are offensive or racist, as well as protected brand names. As some of the color names come from other lists, some bad ones might slip in. Please report them, they will be removed as quickly as possible.