Skip to content

Commit 44dfb62

Browse files
committed
Add a few more colors and remove extra comment
1 parent 99b98d1 commit 44dfb62

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

webapp/javascript/util/format.js

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,29 @@ export function numberWithCommas(x) {
55
}
66

77
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
1618

1719
const items = [
1820
// red,
1921
orange,
20-
yellow,
21-
green,
22+
yellowDark,
2223
blueCyan,
24+
green,
2325
blueDark,
2426
purple,
27+
pink,
28+
yellowLight,
2529
]
2630

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-
4331
let colorIndex = murmurhash3_32_gc(name) % items.length;
4432
return items[colorIndex];
4533
}

0 commit comments

Comments
 (0)