Skip to content

Commit 4181e97

Browse files
committed
split color attributes into attribute.js file
1 parent df06911 commit 4181e97

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

src/components/color/attributes.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// IMPORTANT - default colors should be in hex for compatibility
2+
exports.defaults = [
3+
'#1f77b4', // muted blue
4+
'#ff7f0e', // safety orange
5+
'#2ca02c', // cooked asparagus green
6+
'#d62728', // brick red
7+
'#9467bd', // muted purple
8+
'#8c564b', // chestnut brown
9+
'#e377c2', // raspberry yogurt pink
10+
'#7f7f7f', // middle gray
11+
'#bcbd22', // curry yellow-green
12+
'#17becf' // blue-teal
13+
];
14+
15+
exports.defaultLine = '#444';
16+
17+
exports.lightLine = '#eee';
18+
19+
exports.background = '#fff';

src/components/color/color.js

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@ var isNumeric = require('fast-isnumeric');
55

66
var color = module.exports = {};
77

8-
// IMPORTANT - default colors should be in hex for grid.js
9-
color.defaults = [
10-
'#1f77b4', // muted blue
11-
'#ff7f0e', // safety orange
12-
'#2ca02c', // cooked asparagus green
13-
'#d62728', // brick red
14-
'#9467bd', // muted purple
15-
'#8c564b', // chestnut brown
16-
'#e377c2', // raspberry yogurt pink
17-
'#7f7f7f', // middle gray
18-
'#bcbd22', // curry yellow-green
19-
'#17becf' // blue-teal
20-
];
21-
22-
color.defaultLine = '#444';
23-
color.lightLine = '#eee';
24-
color.background = '#fff';
8+
var colorAttrs = require('./attributes');
9+
color.defaults = colorAttrs.defaults;
10+
color.defaultLine = colorAttrs.defaultLine;
11+
color.lightLine = colorAttrs.lightLine;
12+
color.background = colorAttrs.background;
2513

2614
color.tinyRGB = function(tc) {
2715
var c = tc.toRgb();

0 commit comments

Comments
 (0)