Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const colorLookup = {
- get: (target, attr) => {
- if (typeof target[attr] === 'object' && target[attr] !== null) {
- return new Proxy(target[attr], colorLookup);
- } else if (attr in target) {
- return target[attr];
- } else {
- return attr;
- }
- },
- };
- const colorSchemes = {
- base: {
- white : 'white',
- transparentWhite: 'rgba(256, 256, 256, 0)',
- transparentBlack: 'rgba(0, 0, 0, 0)',
- },
- atlanta: {
- primary : '#C4C4C4',
- secondary: '#910F1B',
- tertiary : '#323232',
- },
- boston: {
- primary : '#174B97',
- secondary: '#EFDF00',
- tertiary : '#000000',
- },
- chengdue: {
- primary : '#FFA000',
- secondary: '#BF926A',
- tertiary : '#161823',
- },
- // the other 17 teams are listed out in the github repo
- };
- export default new Proxy(colorSchemes, colorLookup);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement