Use a numbered pre-named set of user colors instead of random. Closes #1974

This commit is contained in:
Gabe Kangas
2022-06-28 18:55:21 -07:00
parent c9938cf414
commit aec65af87d
9 changed files with 121 additions and 10 deletions

View File

@ -321,11 +321,12 @@ func StringMapKeys(stringMap map[string]interface{}) []string {
return stringSlice
}
// GenerateRandomDisplayColor will return a random _hue_ to be used when displaying a user.
// The UI should determine the right saturation and lightness in order to make it look right.
// GenerateRandomDisplayColor will return a random number that is used for
// referencing a color value client-side. These colors are seen as
// --theme-user-colors-n.
func GenerateRandomDisplayColor() int {
rangeLower := 0
rangeUpper := 360
rangeLower := 1
rangeUpper := 8
return rangeLower + rand.Intn(rangeUpper-rangeLower+1) //nolint
}