Installations
npm install color-name-list
Developer Guide
Typescript
No
Module System
ESM, UMD
Min. Node Version
>=20.11.0
Node Version
20.18.1
NPM Version
10.9.0
Score
97.9
Supply Chain
100
Quality
93.3
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (93.06%)
Shell (3.87%)
Smarty (3.07%)
Developer
Download Statistics
Total Downloads
6,064,265
Last Day
5,993
Last Week
26,647
Last Month
112,840
Last Year
1,590,310
GitHub Statistics
2,475 Stars
829 Commits
185 Forks
28 Watching
7 Branches
29 Contributors
Bundle Size
1.04 MB
Minified
291.97 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
11.4.0
Package Id
color-name-list@11.4.0
Unpacked Size
17.12 MB
Size
4.57 MB
File Count
62
NPM Version
10.9.0
Node Version
20.18.1
Publised On
28 Jan 2025
Total Downloads
Cumulative downloads
Total Downloads
6,064,265
Last day
4.3%
5,993
Compared to previous day
Last week
-10.6%
26,647
Compared to previous week
Last month
10.4%
112,840
Compared to previous month
Last year
-13.1%
1,590,310
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Color Names
A handpicked list of 30277 unique color names from various sources and thousands of curated user submissions.
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 📋
The aim of this project is to create a list of color names as large as possible, while keeping a good name quality. 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.
Explore 🌍
- Color Picker & Name Search Click the wheel to get name for a color, or just use the full text search.
- Color Picker: Click the colored surface to change the color or type in a hex value below the name.
- Color Picker II: Move your mouse and scroll to choose a color.
- Name Search: full text search on the color list.
- Color Distribution 3D view of all color names in different color spaces.
- Twitter Bot: Posts random colors and lets you submit new ones.
Color Name Submission 💌
via form 🌈 / or twitter 🐦
Make sure to read the naming rules before you contribute!
Color Count: 30277 🎉
~0.18% of the RGB color space
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
Usage 📖
Node.js Installation 📦
Size Warning (1.15 MB): If you are doing this in the browser, consider using the public rest API
1npm 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 make it easier to access the names, we offer a free and public Rest API that allows you to access all the color names and names from other publicly available name lists. You can find the full API code and documentation in this repository.
API Example Call Usage
1https://api.color.pizza/v1/?values=00f,f00,f00&list=bestOf
API Disclaimer
The API is free to use and has no limitations. But if your app/site is commercial and causes excessive traffic, I might contact you to become a sponsor.
Feel free to deploy it yourself, it is very easy to host/deploy on heroku and has no dependencies Color-Name-API
Usage JS ⌨
Size Warning (1.15 MB): If you are doing this in the browser, consider using the public rest API
Exact Color
1import { colornames } from 'color-name-list'; 2 3let someColor = colornames.find(color => color.hex === '#ffffff'); 4console.log(someColor.name); // => white 5 6let someNamedColor = colornames.find(color => color.name === 'Eigengrau') 7console.log(someColor.hex); // => #16161d
Closest Named Color
Since there are 16777216 possible RGB colors, you might use a library such as nearest-color or ClosestVector to help you find the the closest named color.
1import nearestColor from 'nearest-color'; 2import { colornames } from 'color-name-list'; 3 4// nearestColor need objects {name => hex} as input 5const colors = colornames.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {}); 6 7const nearest = nearestColor.from(colors); 8 9// get closest named color 10nearest('#f1c1d1'); // => Fairy Tale
Note: If you are looking for something visually more accurate, you could use DeltaE or use the above snippet, but using ciecam02 instead of RGB.
Building 🔨
1npm install && npm run build
See package.json for more.
Usage Java/Kotlin ⌨
Java/Kotlin usage is maintained through this library: UwUAroze/Color-Names. Additional info can be found there, but basic usage is outlined below:
Importing - Gradle.kts
1repositories { 2 maven("https://jitpack.io") 3} 4 5dependencies { 6 implementation("me.aroze:color-names:1.0.2") 7}
Importing - Maven
1<repository> 2 <id>jitpack.io</id> 3 <url>https://jitpack.io</url> 4</repository> 5 6<dependency> 7 <groupId>me.aroze</groupId> 8 <artifactId>color-names</artifactId> 9 <version>1.0.2</version> 10</dependency>
Closest named color - Java
1public ColorNames colorNames = new ColorNameBuilder() 2 .loadDefaults() 3 .build(); 4 5String fromHex = colorNames.getName("#facfea"); // "Classic Rose" 6String fromRGB = colorNames.getName(224, 224, 255); // "Stoic White" 7String fromColor = colorNames.getName(new Color(255, 219, 240)); // "Silky Pink"
Closest named color - Kotlin
1val colorNames = ColorNameBuilder()
2 .loadDefaults()
3 .build()
4
5val fromHex = colorNames.getName("#facfea") // "Classic Rose"
6val fromRGB = colorNames.getName(224, 224, 255) // "Stoic White"
7val fromColor = colorNames.getName(Color(255, 219, 240)) // "Silky Pink"
Usage C# ⌨
C# usage is maintained through this library: vycdev/ColorNamesSharp Additional info can be found there, but basic usage is outlined below:
The library is available as a nuget package
Creating the instance
1ColorNames colorNames = new ColorNamesBuilder() 2 .Add("Best Blue", "#3299fe") // Add your own custom colors 3 .LoadDefault() // Load the default color list 4 .AddFromCsv("path/to/your/colorlist.csv") // Add a custom color list from a csv file 5 .Build(); // Get a new ColorNames instance that includes all the colors you've added
Getting a fitting color name
1NamedColor customNamedColor = new("Custom Named Color", 50, 153, 254); 2 3// You can directly get the name of the color as a string 4string colorNameFromHex = colorNames.FindClosestColorName("#facfea"); // Classic Rose 5string colorNameFromRgb = colorNames.FindClosestColorName(224, 224, 255); // Stoic White 6string colorNameFromNamedColor = colorNames.FindClosestColorName(customNamedColor); // Best Blue 7 8// Or similarly you can get the NamedColor object 9NamedColor namedColorFromHex = colorNames.FindClosestColorName("#facfea"); // Classic Rose 10NamedColor namedColorFromRgb = colorNames.FindClosestColorName(224, 224, 255); // Stoic White 11NamedColor namedColorFromNamedColor = colorNames.FindClosestColorName(customNamedColor); // Best Blue 12 13// Or a random color 14NamedColor randomColor = colorNames.GetRandomNamedColor();
Sources 🗒
Sources: Names 📇
- Thousands of user submissions Twitter / Google Docs / Github
- Wikipedia list of named colors (2018-02-23)
- Wada Sanzo's list of named colors
- CSS/HTML color names
- Werner’s Nomenclature of Colours
- ntc.js
- xkcd color survey list
- htmlcsscolor.com
- OSX Crayons
- Crayola crayon
- Japanese Twelve Level Cap and Rank System colors
- Thailand weekday colors
- Chinese heavenly creatures colors
- Military Paint
- Olympian god colors
- Model Color Paints: Vallejo
- Fictional Colors (2018-05-09)
- Non English Transliterations: Japanese , Mandarin , Hindi , Persian , Russian , Māori
- Multiple paint, print, nail polish, model paint color lists
- Curated Machine Learning names from Matt DesLauriers and Nathan Kjer
- Team Fortress 2 paint colors
Contributors 🦑
- meodai Initiator, maintainer, name creator &, tooling
- Nirazul Name creator & tooling
- Bathos Tooling
- Metafizzy Logo 💖
Costs & Sponsors
Sponsors
Past Sponsors
- Colorful Dots 500USD
- krissymashinsky.com 300USD
- color.museum 100CHF
- @tunnckoCore 50USD
- Myriam Aerne 20CHF
- Amin 15USD
- neverything 25USD/month
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 👮🏾
In an effort to create a more inclusive and respectful environment, we strive to remove all offensive and racist names, as well as protected brand names, from our list. While we do our best to screen out such names, some may still slip through. If you come across any such names, please let us know so that we can remove them promptly.
Latest Color Names 🔖
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
15 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:8
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/linting.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/linting.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/linting.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/updatesponsors.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/updatesponsors.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/updatesponsors.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/updatesponsors.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/updatesponsors.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/meodai/color-names/updatesponsors.yml/master?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 3 third-party GitHubAction dependencies pinned
- Info: 2 out of 2 npmCommand dependencies pinned
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/build.yml:1
- Warn: no topLevel permission defined: .github/workflows/linting.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/updatesponsors.yml:7
- Info: no jobLevel write permissions found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
4.8
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More