2 * Created by onvelocity on 2/3/16.
5 const pairedColors
= ['#fb9a99','#e31a1c','#a6cee3','#1f78b4','#b2df8a','#33a02c','#fdbf6f','#ff7f00','#cab2d6','#6a3d9a','#ffff99','#b15928'];
7 import colorTheme
from '../assets/rift.ware-color-theme.json'
11 * Colors are also defined in _ColorGroups.scss. HINT: Uncomment the console statement at the bottom of this file to
12 * generate the variables and then copy and paste them into the .scss file.
14 * Externalized colors into a .json file to make it easier to modify them.
17 // http://colorbrewer2.org/?type=qualitative&scheme=Paired&n=12
19 // make sure index is not larger than our list of colors
20 index
= (index
* 2) % 12;
22 primary
: pairedColors
[index
+ 1],
23 secondary
: pairedColors
[index
]
27 return Object
.keys(colorTheme
).map((key
) => {
28 if (typeof colorTheme
[key
] === 'object') {
29 const color
= colorTheme
[key
];
30 return Object
.keys(color
).map(name
=> {
31 return `\$${key}-${name}-color: ${color[name]};`
34 if (typeof colorTheme
[key
] === 'string') {
35 const color
= colorTheme
[key
];
36 return `$descriptor-${key}: ${color};\n\n`
40 getColorPairForType(type
) {
41 const colors
= colorTheme
[type
];
45 return colorTheme
.common
;
49 //console.log(ColorGroups.getColorCSS());
51 Object
.assign(ColorGroups
, colorTheme
);
53 export default ColorGroups
;