1. css-color-names
A JSON Object of css color names mapped to their hex value
css-color-names
Package: css-color-names
Created by: bahamas10
Last modified: Tue, 14 Jun 2022 04:31:17 GMT
Version: 1.0.1
License: MIT
Downloads: 14,816,706
Repository: https://github.com/bahamas10/css-color-names

Install

npm install css-color-names
yarn add css-color-names

css-color-names

A JSON Object of css color names mapped to their hex value

Usage

 var csscolors = require('css-color-names');
console.dir(csscolors);

yields

 {
  "aqua": "#00ffff",
  "aliceblue": "#f0f8ff",
  "antiquewhite": "#faebd7",
  "black": "#000000",
  "blue": "#0000ff",
  ...
}

How was this list generated?

In the Makefile you'll see a line like this:

./getcolors.sh | ./stringify.js > $(FILE)

The first command scrapes a site for the list,
and outputs the results separated by newlines. The
second command creates the JSON object and outputs
it to stdout, which then gets redirected into
css-color-names.json

Installation

npm install css-color-names

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code