Topology maps text color vs background #953

Closed
opened 2025-12-29 16:27:13 +01:00 by adam · 1 comment
Owner

Originally created by @lampwins on GitHub (May 15, 2017).

Issue type: bug

Python version: 2.0.1
NetBox version: 2.7.11

I am not sure how much flexibility there is in the rendering of topology maps but when a device role is set to black, the text is not legible at the moment. It would be nice to set the text to white when a role is black.

screen shot 2017-05-15 at 11 18 49 am

Originally created by @lampwins on GitHub (May 15, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: bug <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:** 2.0.1 **NetBox version:** 2.7.11 <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. --> I am not sure how much flexibility there is in the rendering of topology maps but when a device role is set to black, the text is not legible at the moment. It would be nice to set the text to white when a role is black. ![screen shot 2017-05-15 at 11 18 49 am](https://cloud.githubusercontent.com/assets/1297132/26065277/68419312-3961-11e7-8f1c-90b413ead32c.png)
adam added the type: feature label 2025-12-29 16:27:13 +01:00
adam closed this issue 2025-12-29 16:27:13 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 15, 2017):

There's actually a somewhat involved function for determining whether the ideal foreground color for a given background color is white or black, I just haven't gotten around to implementing it: http://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color

@jeremystretch commented on GitHub (May 15, 2017): There's actually a somewhat involved function for determining whether the ideal foreground color for a given background color is white or black, I just haven't gotten around to implementing it: http://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#953