Find and display HTML colors by group or find the primary color that any named color belongs to.
Based on W3C named colors.
$ npm install color-groups
const colorGroups = require('color-groups')
const oranges = colorGroups.get.orange // [ 'orange', 'darkorange', 'coral', 'tomato', 'orangered' ]
const primary = colorGroups.find('papayawhip') // 'yellow'
const myColors = ['palevioletred', 'lemonchiffon', 'cornsilk']
const primaries = myColors.map(color => colorGroups.find(color)) // [ 'pink', 'yellow', 'brown' ]
Tim Dunphy
This project is licensed under the MIT License - see the LICENSE.md file for details.