colornames

Map color names to HEX color values.

colornames

Convert color names to HEX color values.

$ component install timoxley/colornames
var toHex = require('colornames')
toHex('red') // => "#FF0000" 
toHex('blue') // => "#0000FF" 
toHex('lightsalmon') // => "#FFA07A" 
toHex('mediumvioletred') // => "#C71585" 
toHex.get('red')
// => 
{
  name: "red",
  css: true,
  value: "#FF0000",
  vga: true
}

Get HEX code for a color name, or undefined if unknown.

All known data about color, including whether valid VGA or CSS color name.

HEX code for a color name, only if the color is a valid VGA color name.

HEX code for a color name, only if the color is a valid CSS color name.

###.all() Get all color names data.

MIT