@@ -4,20 +4,20 @@ import bezier from 'bezier-easing'
4
4
5
5
function distribute ( value , rangeA , rangeB ) {
6
6
7
- const [ fromLow , fromHigh ] = Array . from ( rangeA )
8
- const [ toLow , toHigh ] = Array . from ( rangeB )
7
+ const [ fromLow , fromHigh ] = Array . from ( rangeA )
8
+ const [ toLow , toHigh ] = Array . from ( rangeB )
9
9
10
- const result = toLow + ( ( ( value - fromLow ) / ( fromHigh - fromLow ) ) * ( toHigh - toLow ) ) ;
10
+ const result = toLow + ( ( ( value - fromLow ) / ( fromHigh - fromLow ) ) * ( toHigh - toLow ) ) ;
11
11
12
- if ( toLow < toHigh ) {
13
- if ( result < toLow ) { return toLow }
14
- if ( result > toHigh ) { return toHigh }
15
- } else {
16
- if ( result > toLow ) { return toLow }
17
- if ( result < toHigh ) { return toHigh }
18
- }
12
+ if ( toLow < toHigh ) {
13
+ if ( result < toLow ) { return toLow }
14
+ if ( result > toHigh ) { return toHigh }
15
+ } else {
16
+ if ( result > toLow ) { return toLow }
17
+ if ( result < toHigh ) { return toHigh }
18
+ }
19
19
20
- return result ;
20
+ return result ;
21
21
}
22
22
23
23
export default function ( { specs} ) {
@@ -33,9 +33,9 @@ export default function({specs}) {
33
33
return array
34
34
}
35
35
36
- var lum_array = generateNumberOfSteps ( Curves [ specs . lum_curve ] , specs . steps )
37
- var sat_array = generateNumberOfSteps ( Curves [ specs . sat_curve ] , specs . steps )
38
- var hue_array = generateNumberOfSteps ( Curves [ specs . hue_curve ] , specs . steps )
36
+ var lum_array = generateNumberOfSteps ( Curves [ specs . lum_curve ] , specs . steps )
37
+ var sat_array = generateNumberOfSteps ( Curves [ specs . sat_curve ] , specs . steps )
38
+ var hue_array = generateNumberOfSteps ( Curves [ specs . hue_curve ] , specs . steps )
39
39
var lum_array_adjusted = [ ]
40
40
var sat_array_adjusted = [ ]
41
41
var hue_array_adjusted = [ ]
@@ -96,15 +96,15 @@ export default function({specs}) {
96
96
lum : chroma ( hex ) . hsv ( ) [ 2 ] ,
97
97
hsv : chroma ( hex ) . hsv ( ) ,
98
98
hsl : chroma ( hex ) . hsl ( ) ,
99
- rgb : chroma ( hex ) . rgb ( ) ,
99
+ rgb : chroma ( hex ) . rgb ( ) ,
100
100
hueRange : [ specs . hue_start , specs . hue_end ] ,
101
101
steps :specs . steps ,
102
102
label :specs . modifier * index ,
103
103
contrastBlack :contrastBlack ,
104
104
contrastWhite :contrastWhite ,
105
105
displayColor :displayColor ,
106
106
}
107
- colorMap . push ( colorObj )
107
+ colorMap . push ( colorObj )
108
108
}
109
109
110
110
return colorMap
0 commit comments