hyper/app/lib/utils/colors.js
Nathan Rajlich 8e86883989 fix lint (#351)
* fix lint

* restore `notify` require, add eslint disable comment
2016-07-21 20:26:10 -07:00

31 lines
513 B
JavaScript

const colorList = [
'black',
'red',
'green',
'yellow',
'blue',
'magenta',
'cyan',
'white',
'lightBlack',
'lightRed',
'lightGreen',
'lightYellow',
'lightBlue',
'lightMagenta',
'lightCyan',
'lightWhite',
'colorCubes',
'grayscale'
];
export function getColorList (colors) {
// For backwards compatibility, return early if it's already an array
if (Array.isArray(colors)) {
return colors;
}
return colorList.map((colorName) => {
return colors[colorName];
});
}