* pick a default color from the main default set, augmented by * itself lighter then darker before repeating
(colorList, extendedColorWays)
| 147 | * itself lighter then darker before repeating |
| 148 | */ |
| 149 | function generateExtendedColors(colorList, extendedColorWays) { |
| 150 | var i; |
| 151 | var colorString = JSON.stringify(colorList); |
| 152 | var colors = extendedColorWays[colorString]; |
| 153 | if(!colors) { |
| 154 | colors = colorList.slice(); |
| 155 | |
| 156 | for(i = 0; i < colorList.length; i++) { |
| 157 | colors.push(tinycolor(colorList[i]).lighten(20).toHexString()); |
| 158 | } |
| 159 | |
| 160 | for(i = 0; i < colorList.length; i++) { |
| 161 | colors.push(tinycolor(colorList[i]).darken(20).toHexString()); |
| 162 | } |
| 163 | extendedColorWays[colorString] = colors; |
| 164 | } |
| 165 | |
| 166 | return colors; |
| 167 | } |
| 168 | |
| 169 | module.exports = { |
| 170 | calc: calc, |
no outgoing calls
no test coverage detected
searching dependent graphs…