Skip to content

Commit

Permalink
Add a few more colors and remove extra comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Rperry2174 committed Jan 13, 2021
1 parent 99b98d1 commit 44dfb62
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions webapp/javascript/util/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,29 @@ export function numberWithCommas(x) {
}

export function colorBasedOnPackageName(name, a) {
const purple = `hsla(246, 40%, 65%, ${a})` //Purple:
const blueDark = `hsla(211, 48%, 60%, ${a})` //BlueDark:
const blueCyan = `hsla(194, 52%, 61%, ${a})` //CyanBlue:
const yellow = `hsla(34, 65%, 65%, ${a})` //Yellow:
const green = `hsla(163, 45%, 55%, ${a})` //Green:
const orange = `hsla(24, 69%, 60%, ${a})` //Orange:
const red = `hsla(3, 62%, 67%, ${a})` // Red:
const grey = `hsla(225, 2%, 51%, ${a})` //Grey:
const purple = `hsla(246, 40%, 65%, ${a})` //Purple
const blueDark = `hsla(211, 48%, 60%, ${a})` //BlueDark
const blueCyan = `hsla(194, 52%, 61%, ${a})` //CyanBlue
const yellowDark = `hsla(34, 65%, 65%, ${a})` //Dark Yellow
const yellowLight = `hsla(47, 100%, 73%, ${a})` //Light Yellow
const green = `hsla(163, 45%, 55%, ${a})` //Green
const orange = `hsla(24, 69%, 60%, ${a})` //Orange
const pink = `hsla(305, 63%, 79%, ${a})` //Pink
// const red = `hsla(3, 62%, 67%, ${a})` // Red
// const grey = `hsla(225, 2%, 51%, ${a})` //Grey

const items = [
// red,
orange,
yellow,
green,
yellowDark,
blueCyan,
green,
blueDark,
purple,
pink,
yellowLight,
]

// const darkGreen = `hsla(160, 40%, 21%, ${a})` //Dark green:
// const darkPurple = `hsla(240, 30%, 29%, ${a})` //puprple:
// const darkBlue = `hsla(226, 36%, 26%, ${a})` //Dark blue:
// const darkPink = `hsla(315, 40%, 24%, ${a})` //Pink:
// const darkYellow = `hsla(62, 29%, 22%, ${a})` //Yellow/mustard:
// const darkRed = `hsla(10, 41%, 23%, ${a})` //Red:
//
// const items = [
// darkGreen,
// darkPurple,
// darkBlue,
// darkPink,
// darkYellow,
// darkRed,
// ]

let colorIndex = murmurhash3_32_gc(name) % items.length;
return items[colorIndex];
}
Expand Down

0 comments on commit 44dfb62

Please sign in to comment.