White cables - color not visible #2611

Closed
opened 2025-12-29 18:20:23 +01:00 by adam · 4 comments
Owner

Originally created by @candlerb on GitHub (May 14, 2019).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5.12

Steps to Reproduce

  1. Click on an interface to add a cable to another interface
  2. Set the cable color to White and save
  3. Click on the cable ID

Expected Behavior

Cable colour to be visible

Observed Behavior

image

But if you hover, the bar is visible (since the background color changes).

The HTML looks like this:

<span class="label color-block" style="background-color: #ffffff">&nbsp;</span>

Possible solution is to add border: 1px solid grey; (either always, or only when the color is white). With this:

image

Relates to: #2693

Originally created by @candlerb on GitHub (May 14, 2019). ### Environment * Python version: 3.5.2 * NetBox version: 2.5.12 ### Steps to Reproduce 1. Click on an interface to add a cable to another interface 2. Set the cable color to White and save 3. Click on the cable ID ### Expected Behavior Cable colour to be visible ### Observed Behavior ![image](https://user-images.githubusercontent.com/44789/57693180-80a82b00-7640-11e9-8173-49c78af09cf3.png) But if you hover, the bar is visible (since the background color changes). The HTML looks like this: ``` <span class="label color-block" style="background-color: #ffffff">&nbsp;</span> ``` Possible solution is to add `border: 1px solid grey;` (either always, or only when the color is white). With this: ![image](https://user-images.githubusercontent.com/44789/57693899-39bb3500-7642-11e9-8520-d7dea54b7a85.png) Relates to: #2693
adam added the status: acceptedtype: feature labels 2025-12-29 18:20:23 +01:00
adam closed this issue 2025-12-29 18:20:23 +01:00
Author
Owner

@candlerb commented on GitHub (May 14, 2019):

This also applies to the "cable trace" view:

image

Again there is a hidden bar which is revealed if you add a border (e.g. by adding a border to the color-block CSS)

image

@candlerb commented on GitHub (May 14, 2019): This also applies to the "cable trace" view: ![image](https://user-images.githubusercontent.com/44789/57694047-a5050700-7642-11e9-880d-c169ed7e009c.png) Again there is a hidden bar which is revealed if you add a border (e.g. by adding a border to the `color-block` CSS) ![image](https://user-images.githubusercontent.com/44789/57694088-c5cd5c80-7642-11e9-9122-7b289042f44f.png)
Author
Owner

@tb-killa commented on GitHub (May 14, 2019):

I prefer something like the border ones with the hex value as text in front of the colored span label.
As the text is display too you could check them easier.

@tb-killa commented on GitHub (May 14, 2019): I prefer something like the border ones with the hex value as text in front of the colored span label. As the text is display too you could check them easier.
Author
Owner

@jeremystretch commented on GitHub (May 14, 2019):

Seems like an easy fix. Anyone want to volunteer a PR?

@jeremystretch commented on GitHub (May 14, 2019): Seems like an easy fix. Anyone want to volunteer a PR?
Author
Owner

@candlerb commented on GitHub (May 20, 2019):

I have made a PR for the simple border fix.

Displaying of hex values should be a separate issue I think, but there is one case where that matters to me. If I have 10 cables to create, then usually I write text in the CSV importer, because the Netbox UI is currently so clunky. But CSV cable import requires hex values for colors, and these are not displayed anywhere in the UI, short of using browser CSS inspector.

However, if the CSV import were to accept the same color names as the dropdown menu, that would work for me.

@candlerb commented on GitHub (May 20, 2019): I have made a PR for the simple border fix. Displaying of hex values should be a separate issue I think, but there is one case where that matters to me. If I have 10 cables to create, then usually I write text in the CSV importer, because the Netbox UI is currently so clunky. But CSV cable import requires hex values for colors, and these are not displayed anywhere in the UI, short of using browser CSS inspector. However, if the CSV import were to accept the same color names as the dropdown menu, that would work for me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2611