npm install gb-palettes
Importing all palettes:
const palettes = require('gb-palettes');
import palettes from 'gb-palettes';
Importing a subset (see categories in table below):
const devicePalettes = require('gb-palettes/src/devices.js');
import devicePalettes from 'gb-palettes/src/devices.js';
Importing a single palette:
const gbPocketColors = require('gb-palettes/src/palettes/gbpocket.js');
import gbPocketColors from 'gb-palettes/src/palettes/gbpocket.js';
Contributions of new palettes is very welcome. If you want to do so, please create a pull-request which contains:
- Addition of your palette to the importable category files.
- The new palette file itself.
module.exports = {
shortName: 'gbcua',
name: 'Game Boy Color Splash Up+A',
palette: ['#ffffff', '#ff8f84', '#943a3a', '#000000'],
origin: 'Wikipedia',
};
- Make sure your contribution matches the rules in the
.editorconfig
. - Use singlequotes.
- Provide a
shortName
which can be used as a vaild ID in html and as a javascript object key. Also, make sure the shortName matches the filename of your palette file. - Provide a descriptive and informational human readable
name
yor your palette* Provide the Hex-Values in lowercase with six characters. - If possible, provide the
origin
of your palette. (source/creator/if you created it yourself, useby YourName
). - Before submitting your pull-request run
npm run readme
to update the table of palettes.