JSPM

paper-colors

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q38030F
  • License MIT

A small set of pastel and off-white paper colors

Package Exports

  • paper-colors

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 (paper-colors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

paper-colors

A set of 12 paper colors from various brands.

This was sourced manually and by eye, so all colours are approximate, and the list is not exhaustive in any way. The colors are subject to change (PRs welcome!).

const paperColors = require('paper-colors');

// Select a random color
const color = paperColors[Math.floor(Math.random() * paperColors.length)];

// Get the hex code e.g. '#e5bb57'
console.log(color.hex);

Each color object has the following format:

{
  "name": "Canary",
  "hex": "#e5bb57",
  "brand": "Springhill Opaque"
}

Install

Use npm to install.

npm install paper-colors --save

Usage

The module exposes a JSON file as its entry point, which includes an array of colour objects.

Sourcing

Most of the data has been manually sourced from Vide Press and its promotional photographs.

PRs welcome for more accurate and exhaustive data.

License

MIT, see LICENSE.md for details.