Security News
PyPIโs New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
color-name-list
Advanced tools
A handpicked list of 29978 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 | Name Sources | Latest Color Names | Sponsors
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.
via form ๐ / or twitter ๐ฆ
Make sure to read the naming rules before you contribute!
~0.18% of the RGB color space
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
npm install color-name-list --save
or yarn add color-name-list
JSON / JSON.min / CSV / YML / JS / XML / HTML / SCSS
JSON / JSON.min / CSV / YML / JS / XML / HTML / SCSS / CSS
https://api.color.pizza/v1/{{hexvalue without the #}},{{more comma separated values}}
or
https://api.color.pizza/v1/?values={{hexvalue without the #}},{{more comma separated values}}
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",
}]
}
curl
https://api.color.pizza/v1/212121,060606,ff0012,550055,123456
or
curl
https://api.color.pizza/v1/?values=212121,060606,ff0012,550055,123456
curl
https://api.color.pizza/v1/
In this case colors is not an object
but an array
of objects
sorted by color-name
by adding ?noduplicates=true
every returned name will be unique.
The closest color, that was not returned previously will be returned:
curl
https://api.color.pizza/v1/?values=212121,212121&noduplicates=true
{
"colors": [{
"name": "Lead",
"hex": "#212121",
"rgb": { "r": 33, "g": 33, "b": 33 },
"luminance": 22.062320231562225
},{
"name": "Abaddon Black",
"hex": "#231f20",
"rgb": { "r": 35, "g": 31, "b": 32 },
"luminance": 21.30621829419759
}]
}
https://api.color.pizza/v1/names/{{query}}
or
https://api.color.pizza/v1/names/?name={{query}}
Returns an array
of color objects
which match the given query, sorted by color-name:
curl
https://api.color.pizza/v1/names/red
Not all color-names are created equal; add ?goodnamesonly=true
to your request URL to get a handpicked subset of names that were rated as good
by humans. (Colors that are liked a lot on twitter
and some of the team favourites).
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 server.js
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
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.
import nearestColor from 'nearest-color';
import colorNameList from 'color-name-list';
// nearestColor need objects {name => hex} as input
const colors = colorNameList.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {});
const nearest = nearestColor.from(colors);
// get closest named color
nearest('#f1c1d1'); // => Fairy Tale
Alternative package: ktree
Note: If you are looking for something visually more accurate, you could: use DeltaE, or use the above snippet, combined with a transform from rgb to ciecam02 scaled to 0-255.
npm install && npm run build
See package.json for more.
Item | Expenditure |
---|---|
Logo by Metafizzy | 800 |
Item | Expenditure |
---|---|
Color Name API Server | 264.60/year |
color.pizza domain name | 36.16/year |
Cloudflare PRO Plan | 240/year |
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
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.
FAQs
long list of color names
The npm package color-name-list receives a total of 23,612 weekly downloads. As such, color-name-list popularity was classified as popular.
We found that color-name-list demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.