Skip to content

Commit

Permalink
Remove hard-coded precalculated colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjswensen committed Dec 15, 2018
1 parent 1f1ac6d commit 009f7f9
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ Object {
"accent6": "#995785",
"accent7": "#AC7155",
"shade0": "#2A2021",
"shade1": "#463D3E",
"shade2": "#625A5C",
"shade3": "#7E7779",
"shade4": "#999496",
"shade5": "#B5B1B3",
"shade6": "#D1CED1",
"shade7": "#EDEBEE",
},
"light": Object {
Expand All @@ -30,12 +24,6 @@ Object {
"accent6": "#813D72",
"accent7": "#A1684F",
"shade0": "#EDEBEE",
"shade1": "#D1CED1",
"shade2": "#B5B1B3",
"shade3": "#999496",
"shade4": "#7E7779",
"shade5": "#625A5C",
"shade6": "#463D3E",
"shade7": "#2A2021",
},
}
Expand Down
12 changes: 0 additions & 12 deletions cli/packages/themer-colors-finger-paint/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ module.exports.colors = {
accent6: '#995785',
accent7: '#AC7155',
shade0: '#2A2021',
shade1: '#463D3E',
shade2: '#625A5C',
shade3: '#7E7779',
shade4: '#999496',
shade5: '#B5B1B3',
shade6: '#D1CED1',
shade7: '#EDEBEE',
},
light: {
Expand All @@ -27,12 +21,6 @@ module.exports.colors = {
accent6: '#813D72',
accent7: '#A1684F',
shade0: '#EDEBEE',
shade1: '#D1CED1',
shade2: '#B5B1B3',
shade3: '#999496',
shade4: '#7E7779',
shade5: '#625A5C',
shade6: '#463D3E',
shade7: '#2A2021',
},
};
5 changes: 4 additions & 1 deletion cli/packages/themer-colors-finger-paint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themer-colors-finger-paint",
"version": "1.0.4",
"version": "2.0.0",
"description": "A warm and friendly color set for themer.",
"main": "lib/index.js",
"engines": {
Expand Down Expand Up @@ -29,5 +29,8 @@
"url": "https://github.com/mjswensen/themer/issues"
},
"homepage": "https://github.com/mjswensen/themer/tree/master/cli/packages/themer-colors-finger-paint#readme",
"peerDependencies": {
"themer": "^3"
},
"devDependencies": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ Object {
"accent6": "#5073B8",
"accent7": "#A067AB",
"shade0": "#23292D",
"shade1": "#42474B",
"shade2": "#616668",
"shade3": "#808486",
"shade4": "#A0A2A4",
"shade5": "#BFC0C2",
"shade6": "#DEDFDF",
"shade7": "#FDFDFD",
},
}
Expand Down
6 changes: 0 additions & 6 deletions cli/packages/themer-colors-github-universe/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ module.exports.colors = {
accent6: '#5073B8',
accent7: '#A067AB',
shade0: '#23292D',
shade1: '#42474B',
shade2: '#616668',
shade3: '#808486',
shade4: '#A0A2A4',
shade5: '#BFC0C2',
shade6: '#DEDFDF',
shade7: '#FDFDFD',
},
};
5 changes: 4 additions & 1 deletion cli/packages/themer-colors-github-universe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themer-colors-github-universe",
"version": "1.0.4",
"version": "2.0.0",
"description": "A dark color set for themer, based on the GitHub Universe 2017 color palette.",
"main": "lib/index.js",
"engines": {
Expand Down Expand Up @@ -29,5 +29,8 @@
"url": "https://github.com/mjswensen/themer/issues"
},
"homepage": "https://github.com/mjswensen/themer/tree/master/cli/packages/themer-colors-github-universe#readme",
"peerDependencies": {
"themer": "^3"
},
"devDependencies": {}
}
12 changes: 0 additions & 12 deletions cli/packages/themer-colors-monkey/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ exports.colors = {
accent6: '#BB91B7',
accent7: '#C08DA4',
shade0: '#48463E',
shade1: '#5E5C55',
shade2: '#73736B',
shade3: '#898982',
shade4: '#9F9F99',
shade5: '#B5B5B0',
shade6: '#CACCC6',
shade7: '#E0E2DD',
},
light: {
Expand All @@ -27,12 +21,6 @@ exports.colors = {
accent6: '#9D7A9A',
accent7: '#B2889B',
shade0: '#EDEBE8',
shade1: '#D5D4D0',
shade2: '#BCBCB7',
shade3: '#A4A59F',
shade4: '#8B8E87',
shade5: '#73776F',
shade6: '#5A5F56',
shade7: '#42483E',
},
};
21 changes: 15 additions & 6 deletions cli/packages/themer-colors-monkey/lib/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
const { colors } = require('./index');

describe('themer-colors-monkey', () => {
it('should define all 32 required colors', () => {
const prefixes = [ 'accent', 'shade' ];
it('should define all required colors', () => {
const prefixes = [
'accent0',
'accent1',
'accent2',
'accent3',
'accent4',
'accent5',
'accent6',
'accent7',
'shade0',
'shade7',
]
prefixes.forEach(prefix => {
for (let i = 0; i <= 7; i++) {
expect(colors.dark[`${prefix}${i}`]).toBeDefined();
expect(colors.light[`${prefix}${i}`]).toBeDefined();
}
expect(colors.dark[prefix]).toBeDefined();
expect(colors.light[prefix]).toBeDefined();
});
});
});
5 changes: 4 additions & 1 deletion cli/packages/themer-colors-monkey/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themer-colors-monkey",
"version": "1.0.1",
"version": "2.0.0",
"description": "A color set for themer based on https://twitter.com/pwnela/status/908823633283502080.",
"main": "lib/index.js",
"engines": {
Expand All @@ -23,6 +23,9 @@
"url": "https://github.com/mjswensen/themer/issues"
},
"homepage": "https://github.com/mjswensen/themer/tree/master/cli/packages/themer-colors-monkey#readme",
"peerDependencies": {
"themer": "^3"
},
"dependencies": {},
"keywords": [
"themer",
Expand Down
6 changes: 0 additions & 6 deletions cli/packages/themer-colors-night-sky/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ module.exports.colors = {
accent7: '#B35D8D',

shade0: '#13222E',
shade1: '#293845',
shade2: '#3F4F5B',
shade3: '#556572',
shade4: '#6A7B88',
shade5: '#80919F',
shade6: '#96A8B5',
shade7: '#ACBECC',

},
Expand Down
19 changes: 14 additions & 5 deletions cli/packages/themer-colors-night-sky/lib/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ describe('themer-colors-night-sky', () => {
expect(colors.dark).toBeDefined();
});

it('should define all 16 required colors', () => {
const prefixes = [ 'accent', 'shade' ];
it('should define all required colors', () => {
const prefixes = [
'accent0',
'accent1',
'accent2',
'accent3',
'accent4',
'accent5',
'accent6',
'accent7',
'shade0',
'shade7',
];
prefixes.forEach(prefix => {
for (let i = 0; i <= 7; i++) {
expect(colors.dark[`${prefix}${i}`]).toBeDefined();
}
expect(colors.dark[prefix]).toBeDefined();
});
});

Expand Down
5 changes: 4 additions & 1 deletion cli/packages/themer-colors-night-sky/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themer-colors-night-sky",
"version": "1.0.9",
"version": "2.0.0",
"description": "A dark color set for themer.",
"main": "lib/index.js",
"engines": {
Expand All @@ -23,6 +23,9 @@
"url": "https://github.com/mjswensen/themer/issues"
},
"homepage": "https://github.com/mjswensen/themer/tree/master/cli/packages/themer-colors-night-sky#readme",
"peerDependencies": {
"themer": "^3"
},
"dependencies": {},
"keywords": [
"themer",
Expand Down
12 changes: 0 additions & 12 deletions cli/packages/themer-colors-polar-ice/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ module.exports.colors = {
accent7: '#F79CE0',

shade0: '#44484F',
shade1: '#586169',
shade2: '#6A7A82',
shade3: '#7D929B',
shade4: '#90AAB4',
shade5: '#A3C2CD',
shade6: '#B5DBE6',
shade7: '#C7F3FF',

},
Expand All @@ -34,12 +28,6 @@ module.exports.colors = {
accent7: '#CC52AD',

shade0: '#DBF7FF',
shade1: '#C5DDE6',
shade2: '#AEC4CD',
shade3: '#98AAB4',
shade4: '#81919A',
shade5: '#6B7781',
shade6: '#545E68',
shade7: '#3E444F',

},
Expand Down
19 changes: 14 additions & 5 deletions cli/packages/themer-colors-polar-ice/lib/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ describe('themer color set', () => {
});

it('should define all 16 required colors for each theme', () => {
const prefixes = [ 'accent', 'shade' ];
const prefixes = [
'accent0',
'accent1',
'accent2',
'accent3',
'accent4',
'accent5',
'accent6',
'accent7',
'shade0',
'shade7',
];
prefixes.forEach(prefix => {
for (let i = 0; i <= 7; i++) {
expect(colors.light[`${prefix}${i}`]).toBeDefined();
expect(colors.dark[`${prefix}${i}`]).toBeDefined();
}
expect(colors.light[prefix]).toBeDefined();
expect(colors.dark[prefix]).toBeDefined();
});
});

Expand Down
5 changes: 4 additions & 1 deletion cli/packages/themer-colors-polar-ice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themer-colors-polar-ice",
"version": "1.0.5",
"version": "2.0.0",
"description": "A chilly color set for themer.",
"main": "lib/index.js",
"engines": {
Expand Down Expand Up @@ -28,6 +28,9 @@
"url": "https://github.com/mjswensen/themer/issues"
},
"homepage": "https://github.com/mjswensen/themer/tree/master/cli/packages/themer-colors-polar-ice#readme",
"peerDependencies": {
"themer": "^3"
},
"devDependencies": {},
"dependencies": {}
}

0 comments on commit 009f7f9

Please sign in to comment.