kevinburke / doony

UI Improvements for Jenkins
http://doony.org
Other
970 stars 116 forks source link

Question about the "Custom Color" feature #98

Open nate2014jatc opened 5 years ago

nate2014jatc commented 5 years ago

Hello, we are using version 2.1

I would like to know how the "Custom color" is generated. I've recently moved from a localhost install to a proper installation. We went from a bright red, to a kind of dark purple color, and I'd like to change that, if possible.

kevinburke commented 5 years ago

It's based on a hash of the domain name since I wanted localhost/staging etc to show up in different colors. I believe there is a configuration option you can use to set it...

kevinburke commented 5 years ago
var color = colors[Math.abs(hashCode(domain)) % colors.length];

where colors are

kevinburke commented 5 years ago

https://github.com/kevinburke/doony/blob/master/doony.js#L331-L338

kevinburke commented 5 years ago

I can give you permissions to the repo for you to make the change to make it customizable if you want (there might be an open ticket for it) or I'd suggest just modifying the Javascript to remove the colors you don't like.