[PR #12440] [CLOSED] 12219 adjust widget header contrast #13973

Closed
opened 2025-12-29 23:21:50 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12440
Author: @arthanson
Created: 5/2/2023
Status: Closed

Base: developHead: 12219-widget-contrast


📝 Commits (1)

  • c7d8b2d 12436 adjust foreground color for widgets

📊 Changes

3 files changed (+76 additions, -4 deletions)

View changed files

📝 netbox/templates/extras/dashboard/widget.html (+4 -3)
netbox/utilities/colors.py (+34 -0)
📝 netbox/utilities/templatetags/builtins/filters.py (+38 -1)

📄 Description

Fixes: #12219

  1. updates foreground_color template tag to work with color values "red" instead of hex values.
  2. change widget template to use this for text and icons
  3. adds some utility functions to lighten (and darken) a color, used to make gear and close icons lighter then text

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/12440 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 5/2/2023 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `12219-widget-contrast` --- ### 📝 Commits (1) - [`c7d8b2d`](https://github.com/netbox-community/netbox/commit/c7d8b2d9db7808cd4dbb0b99a69fa991bf600f0e) 12436 adjust foreground color for widgets ### 📊 Changes **3 files changed** (+76 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/templates/extras/dashboard/widget.html` (+4 -3) ➕ `netbox/utilities/colors.py` (+34 -0) 📝 `netbox/utilities/templatetags/builtins/filters.py` (+38 -1) </details> ### 📄 Description ### Fixes: #12219 1. updates foreground_color template tag to work with color values "red" instead of hex values. 2. change widget template to use this for text and icons 3. adds some utility functions to lighten (and darken) a color, used to make gear and close icons lighter then text --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:21:50 +01:00
adam closed this issue 2025-12-29 23:21:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13973