@@ -5,41 +5,29 @@ export function numberWithCommas(x) {
5
5
}
6
6
7
7
export function colorBasedOnPackageName ( name , a ) {
8
- const purple = `hsla(246, 40%, 65%, ${ a } )` //Purple:
9
- const blueDark = `hsla(211, 48%, 60%, ${ a } )` //BlueDark:
10
- const blueCyan = `hsla(194, 52%, 61%, ${ a } )` //CyanBlue:
11
- const yellow = `hsla(34, 65%, 65%, ${ a } )` //Yellow:
12
- const green = `hsla(163, 45%, 55%, ${ a } )` //Green:
13
- const orange = `hsla(24, 69%, 60%, ${ a } )` //Orange:
14
- const red = `hsla(3, 62%, 67%, ${ a } )` // Red:
15
- const grey = `hsla(225, 2%, 51%, ${ a } )` //Grey:
8
+ const purple = `hsla(246, 40%, 65%, ${ a } )` //Purple
9
+ const blueDark = `hsla(211, 48%, 60%, ${ a } )` //BlueDark
10
+ const blueCyan = `hsla(194, 52%, 61%, ${ a } )` //CyanBlue
11
+ const yellowDark = `hsla(34, 65%, 65%, ${ a } )` //Dark Yellow
12
+ const yellowLight = `hsla(47, 100%, 73%, ${ a } )` //Light Yellow
13
+ const green = `hsla(163, 45%, 55%, ${ a } )` //Green
14
+ const orange = `hsla(24, 69%, 60%, ${ a } )` //Orange
15
+ const pink = `hsla(305, 63%, 79%, ${ a } )` //Pink
16
+ // const red = `hsla(3, 62%, 67%, ${a})` // Red
17
+ // const grey = `hsla(225, 2%, 51%, ${a})` //Grey
16
18
17
19
const items = [
18
20
// red,
19
21
orange ,
20
- yellow ,
21
- green ,
22
+ yellowDark ,
22
23
blueCyan ,
24
+ green ,
23
25
blueDark ,
24
26
purple ,
27
+ pink ,
28
+ yellowLight ,
25
29
]
26
30
27
- // const darkGreen = `hsla(160, 40%, 21%, ${a})` //Dark green:
28
- // const darkPurple = `hsla(240, 30%, 29%, ${a})` //puprple:
29
- // const darkBlue = `hsla(226, 36%, 26%, ${a})` //Dark blue:
30
- // const darkPink = `hsla(315, 40%, 24%, ${a})` //Pink:
31
- // const darkYellow = `hsla(62, 29%, 22%, ${a})` //Yellow/mustard:
32
- // const darkRed = `hsla(10, 41%, 23%, ${a})` //Red:
33
- //
34
- // const items = [
35
- // darkGreen,
36
- // darkPurple,
37
- // darkBlue,
38
- // darkPink,
39
- // darkYellow,
40
- // darkRed,
41
- // ]
42
-
43
31
let colorIndex = murmurhash3_32_gc ( name ) % items . length ;
44
32
return items [ colorIndex ] ;
45
33
}
0 commit comments