Skip to content

meodai/color-names

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Color Names Logo

Color Names

Actions Status GitHub release npm version npm name count github sponsor count

A meticulously curated collection of 30300 unique color names, sourced from various references and thousands of thoughtful user contributions.

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

Explore / Find Names | Name distribution in different models | Usage | CDN | Public Rest API | Usage JS/Java/Kotlin/C# | Name Sources | Latest Color Names | Sponsors

About ๐Ÿ“‹

This project aims to assemble the largest possible list of color names, while maintaining high standards for name quality. We have merged numerous lists, resolved duplicate names with different hex values, and adjusted colors where identical values had different names.

Explore ๐ŸŒ

  • Color Picker & Name Search: Click the wheel to discover a color name, or use the full text search.
  • Color Picker: Click the colored area to change the color or enter a hex value below the name.
  • Color Picker II: Move your mouse and scroll to select a color.
  • Name Search: Perform a full text search on the color list.
  • Color Distribution: Explore a 3D visualization of all color names in various color models.
  • Twitter Bot: Posts random colors and allows you to submit new ones.

Color Name Submission ๐Ÿ’Œ

via form ๐ŸŒˆ / or twitter ๐Ÿฆ

Please review the naming rules before contributing!

Contributing via Git ๐Ÿซฑ๐Ÿฝโ€๐Ÿซฒ๐Ÿป

To contribute via Git, edit the src/colornames.csv file and ensure it builds correctly (npm run ci && npm run build).

Color Count: 30300 ๐ŸŽ‰

~0.18% of the RGB color space

3d representation of color distribution in RGB Space (Preview image of link above)

When creating new color names, it's essential to understand which areas of a color space are crowded and where new names can be added. For example, our API returns the closest RGB color to a given HEX value. To prevent too many colors from mapping to the same name, we strive for an even distribution in color space: Visualization

Usage ๐Ÿ“–

Consuming the list

The list is available in multiple formats, or you can use the public REST API, making it easy to integrate into your project.

Node.js Installation ๐Ÿ“ฆ

Size Warning (1.15 MB): For browser usage, consider the public rest API

npm install color-name-list --save

or yarn add color-name-list

CDN ๐ŸŒ

All Names ๐Ÿ“š

JSON / JSON.min / CSV / YML / JS / XML / HTML / SCSS

Best of Names subset ๐Ÿ†

JSON / JSON.min / CSV / YML / JS / XML / HTML / SCSS / CSS

API ๐Ÿƒ

To simplify access, we provide a free and public REST API for all color names and other public name lists. Full API code and documentation are available in this repository.

API Example Call Usage

https://api.color.pizza/v1/?values=00f,f00,f00&list=bestOf

API Disclaimer

The API is free and has no usage limits. However, if your commercial app or site generates excessive traffic, you may be asked to become a sponsor.

You are welcome to self-host the APIโ€”it's easy to deploy on Heroku and relies only on a few dependencies: Color-Name-API

Usage JS โŒจ

Size Warning (1.15 MB): For browser usage, consider the public rest API

Exact Color

import { colornames } from 'color-name-list';

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

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

Closest Named Color

With 16,777,216 possible RGB colors, you may want to use a library such as nearest-color or ClosestVector to find the closest named color.

import nearestColor from 'nearest-color';
import { colornames } from 'color-name-list';

// nearestColor expects an object {name => hex}
const colors = colornames.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {});

const nearest = nearestColor.from(colors);

// get closest named color
nearest('#f1c1d1'); // => Fairy Tale

Note: For greater visual accuracy, consider using DeltaE or the above approach with ciecam02 instead of RGB.

Building ๐Ÿ”จ

npm install && npm run build

See package.json for details.

Usage Java/Kotlin โŒจ

Java/Kotlin support is provided by: UwUAroze/Color-Names. See the repository for more, or use the basics below:

Importing - Gradle.kts

repositories {
      maven("https://jitpack.io")
}

dependencies {
      implementation("me.aroze:color-names:1.0.4")
}

Importing - Maven

<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>

<dependency>
  <groupId>me.aroze</groupId>
  <artifactId>color-names</artifactId>
  <version>1.0.4</version>
</dependency>

Closest named color - Java

public ColorNames colorNames = new ColorNameBuilder()
  .loadDefaults()
  .build();

String fromHex = colorNames.getName("#facfea"); // "Classic Rose"
String fromRGB = colorNames.getName(224, 224, 255); // "Stoic White"
String fromColor = colorNames.getName(new Color(255, 219, 240)); // "Silky Pink"

Closest named color - Kotlin

val colorNames = ColorNameBuilder()
  .loadDefaults()
  .build()

val fromHex = colorNames.getName("#facfea") // "Classic Rose"
val fromRGB = colorNames.getName(224, 224, 255) // "Stoic White"
val fromColor = colorNames.getName(Color(255, 219, 240)) // "Silky Pink"

Usage C# โŒจ

C# support is provided by: vycdev/ColorNamesSharp See the repository for more details; basic usage is below:

The library is available as a nuget package

Creating the instance

ColorNames colorNames = new ColorNamesBuilder()
  .Add("Best Blue", "#3299fe") // Add your own custom colors
  .LoadDefault() // Load the default color list
  .AddFromCsv("path/to/your/colorlist.csv") // Add a custom color list from a csv file
  .Build(); // Get a new ColorNames instance that includes all the colors you've added

Getting a fitting color name

NamedColor customNamedColor = new("Custom Named Color", 50, 153, 254);

// You can directly get the name of the color as a string
string colorNameFromHex = colorNames.FindClosestColorName("#facfea"); // Classic Rose
string colorNameFromRgb = colorNames.FindClosestColorName(224, 224, 255); // Stoic White
string colorNameFromNamedColor = colorNames.FindClosestColorName(customNamedColor); // Best Blue

// Or similarly you can get the NamedColor object
NamedColor namedColorFromHex = colorNames.FindClosestColorName("#facfea"); // Classic Rose
NamedColor namedColorFromRgb = colorNames.FindClosestColorName(224, 224, 255); // Stoic White
NamedColor namedColorFromNamedColor = colorNames.FindClosestColorName(customNamedColor); // Best Blue

// Or a random color
NamedColor randomColor = colorNames.GetRandomNamedColor();

Sources ๐Ÿ—’

Sources: Names ๐Ÿ“‡

Contributors ๐Ÿฆ‘

Costs & Sponsors

Sponsors

Past Sponsors

Project Costs USD

One-Time

Item Expenditure
Logo by Metafizzy 800

Periodic

Item Expenditure
Color Name API Server 264.60/year
color.pizza domain name 36.16/year
Cloudflare PRO Plan 240/year

Color Namers

Verena the naming overlord , Jess the name wizard , Syl , Stephanie Stutz , Simbiasamba , Jason Wilson , Inรชs Joรฃo , Nick Niles , Qwhex , Ichatdelune , basgys , Shelina S. , Trevor Elia , cheesits456 , Sandhya Subram , BerylBucket , Jimmy Fitzback , TLZ , DarthTorus , Carrion , BlueChaos , nachtfunke , Sean Gibbons , Brantley Sibo

Disclaimer ๐Ÿ‘ฎ๐Ÿพโ€

We are committed to fostering an inclusive and respectful environment. We actively remove any offensive, racist, or protected brand names from our list. While we strive to screen out such names, some may inadvertently remain. If you encounter any, please let us know so we can address them promptly.

Latest Color Names ๐Ÿ”–

New colors