Skip to content

fix(ui): use brand color tokens instead of hardcoded hex in new UI#14999

Open
ksitton58 wants to merge 1 commit into
DefectDojo:devfrom
ksitton58:fix/new-ui-legacy-bootstrap-blue
Open

fix(ui): use brand color tokens instead of hardcoded hex in new UI#14999
ksitton58 wants to merge 1 commit into
DefectDojo:devfrom
ksitton58:fix/new-ui-legacy-bootstrap-blue

Conversation

@ksitton58

Copy link
Copy Markdown

Description

Several new-UI templates hardcoded brand colors that should reference the design
tokens in components/tailwind.css:

  • calendar.html — active engagement/test events used the legacy Bootstrap primary
    blue (#337ab7) instead of the brand blue.
  • benchmark.html — table link color, same legacy #337ab7.
  • base.html — sidebar background (#003864) and sub-nav link color (#82B0D9)
    hardcoded the Fuji Blue brand hues.

These now use the matching var(--color-dd-primary-*) tokens (500 / 900 / 200). The
token values are identical to the hardcoded hex, so there is no visual change.

Intentionally left as-is:

  • Sidebar's lighter link color (#C6DDF2): the matching shade (dd-primary-100) is
    not emitted in the compiled CSS, since Tailwind v4 only outputs theme variables
    that a generated utility references.
  • PDF report templates also contain #337ab7, but CSS custom properties don't resolve
    in the PDF renderer.
  • Generic white/black, neutral grays, and the custom #002a4d shade have no token.

FullCalendar 3.10.5 applies the event color verbatim as an inline style, so the
variable resolves at render time.

Test results

Verified in the running new UI: sidebar bg = rgb(0,56,100), sub-nav link =
rgb(130,176,217), calendar event = rgb(23,121,197) — each identical to the hex it
replaced. No Python changed, so no unit tests added.

Documentation

N/A.

Checklist

  • Submitted against dev.
  • Meaningful PR name.
  • Ruff compliant (no Python changed).
  • Python 3.13 compliant (no Python changed).

Several new-UI templates hardcoded brand colors that should reference the
design tokens defined in components/tailwind.css:

- calendar.html: active engagement/test events used the legacy Bootstrap
  primary blue (#337ab7) instead of the brand blue.
- benchmark.html: table link color, same legacy #337ab7.
- base.html: sidebar background (DefectDojo#3864) and sub-nav link color (#82B0D9)
  hardcoded the Fuji Blue brand hues.

These now use the matching var(--color-dd-primary-*) tokens (500/900/200).
Token values are identical to the hardcoded hex, so there is no visual change.

Intentionally left as-is:
- The sidebar lighter link color (#C6DDF2): the matching shade
  (dd-primary-100) is not emitted in the compiled CSS, since Tailwind v4 only
  outputs theme variables referenced by a generated utility.
- PDF report templates also contain #337ab7, but CSS custom properties do not
  resolve in the PDF renderer.
- Generic white/black, neutral grays, and the custom #002a4d shade have no
  design token.

FullCalendar 3.10.5 applies the event color verbatim as an inline style, so
the variable resolves at render time. Verified in the running new UI: sidebar
bg = rgb(0,56,100), sub-nav link = rgb(130,176,217), calendar event =
rgb(23,121,197) -- each identical to the hex it replaced.
@ksitton58 ksitton58 force-pushed the fix/new-ui-legacy-bootstrap-blue branch from a4a8ba1 to c93f3b9 Compare June 11, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant