netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.26k stars 2.59k forks source link

more colors for rack/device roles #672

Closed Armadill0 closed 7 years ago

Armadill0 commented 8 years ago

With release 1.5.1 you introduced colors for rack and device roles, which is a great thing to quickly identify different types of devices. Unfortunately we are running out of colors for our device roles. So it would be a great if you could increase the amount of available colors to at least 20 or more.

Or maybe a better idea: Simply use something like a color picker where the user can quickly choose from the full rgb colors.

aoyawale commented 8 years ago

ran out of colors too.

xenuser commented 8 years ago

I agree. It would be great if you could literally add an infinite amount of colors (read: a reasonable amount of colors like 256) to NetBox.

Gelob commented 8 years ago

Should at least have the hex code and/or RGB input. There are some Django plugins as well

https://github.com/jaredly/django-colorfield https://github.com/gsiegman/django-paintstore https://github.com/charettes/django-colorful

jeremystretch commented 8 years ago

I wanted to avoid forcing people to pick their own colors, since it's difficult to find colors that are easily discernible from one another. However, I agree that the limited set we have now is insufficient. I think it would make sense to offer a list of maybe a few dozen colors, similar to the color picker in word processors. Specifically, I want to avoid colors that are easily mistaken for one another, as that would defeat the purpose of color-coding in the first place.

jeremystretch commented 7 years ago

eb4cd0e replaces the static list of ten color names with a field which holds an arbitrary hexadecimal RGB value. However, the form widget restricts the user to selecting one of 24 predefined colors to avoid picking colors that are easily confused with one another.

For now, I've stuck with a simple <select> for the field's form widget. In the future this may be replaced by a JavaScript-enabled color picker.