Skip to content

UX: Improve accessibility of default theme - colour palette #5532

Closed

Description

@knolleary

This risks being a fairly open-ended task, so want to keep the scope to a reasonable level.

This issue was recently raised that identified a number of issues with the palette manager - #5505. This identifies more than just colour-scheme related items and I'm sure there will be common issues that apply more widely.

Given the potential broad scope, I think we should break this down into further sub tasks. The first task being accessibility of the existing colour scheme - for example the contrast of button states etc.

A separate task will be to look at the non-colour-theme related items from 5505 - around ensuring appropriate meta tags are attached to elements etc.

Activity

  1. added this to the 5.0 milestone on Mar 6, 2026
  2. added theissue type on Mar 6, 2026
  3. dimitrieh commented on Mar 6, 2026

    @dimitrieh
    Contributor

    @knolleary @n-lark please have a look at https://www.radix-ui.com/colors Using their color palette is going to save us a lot of time and give us a good accessibility foundation

  4. self-assigned this
    on Apr 1, 2026
  5. self-assigned this
    on Apr 2, 2026
  6. n-lark commented on Apr 6, 2026

    @n-lark
    Contributor

    Accessibility Color Audit — Node-RED Default Theme

    Contrast ratios

    WCAG AA requires a 4.5:1 contrast ratio for normal text and 3:1 for large text or UI components. The ratio is measured between a foreground color and its background, higher is better. Was:1 and Now:1 in the tables below show the ratio before and after each change.

    Radix UI color scale

    Radix UI Colors is an open-source color system where each color (e.g. Gray, Blue, Red) has 12 steps from lightest to darkest. Steps 1–2 are backgrounds, 6–8 are borders, and 11–12 are guaranteed accessible text colors. Where a value is marked e.g. Radix Gray 11, that means it comes from step 11 of the Gray scale and is verified to meet WCAG AA contrast against the corresponding background steps.


    Before & After

    Canvas view

    Before

    Image

    After

    Image

    Edit dialog

    Before

    Image

    After

    Image

    Accessibility Compliance Fixes

    Values derived from Radix UI color scale step 11 unless noted.

    Summary of changes
    # Variable Was Now Was:1 Now:1 Where
    1 $secondary-text-color #888 #646464 (Radix Gray 11) 3.55 ❌ 6.10 ✅ All workspace buttons, menus, list labels, palette controls — cascades to 20+ components
    2 $node-port-label-color #888 #646464 (Radix Gray 11) 3.55 ❌ 6.10 ✅ Node port labels on canvas
    3 $tertiary-text-color #aaa #696969 2.32 ❌ 4.82 ✅ Form placeholders, tab badges, menu carets, sub-labels. Value chosen to pass on both white and #f0f0f0 chrome surfaces
    4 $text-color-warning #CAB200 #ab6400 (Radix Amber 11) 2.13 ❌ 5.30 ✅ Warning text throughout UI
    5 $border-color-warning #FFCF70 #e79a00 1.46 ❌ 3.10 ✅ Warning borders (UI component 3:1 requirement)
    6 $text-color-success #3a3 #218358 (Radix Green 11) 3.02 ❌ 5.10 ✅ Success state text
    7 $text-color-link #0088cc #0d74ce (Radix Blue 11) 3.89 ❌ 4.70 ✅ Links throughout UI
    8 $group-default-label-color #a4a4a4 #767676 2.64 ❌ 4.54 ✅ Node group labels on canvas
    9 $diff-state-added #009900 #19704e 3.79 ❌ 5.40 ✅ Diff "added" text on green row background
    10 $diff-state-deleted #f80000 #ce2c31 (Radix Red 11) 4.22 ❌ 5.90 ✅ Diff "deleted" text
    11 $diff-state-changed #f89406 #9a5a00 3.40 ❌ 5.04 ✅ Diff "changed" text on amber row background
    12 $diff-state-moved #3f81b3 #2d6a9f 4.20 ❌ 5.72 ✅ Diff "moved" text on white
    13 $debug-message-text-color-meta #a66 #914f4f 4.45 ❌ 6.11 ✅ Debug panel metadata text on white
    14 $tourGuide-heading-color / $tourGuide-border #c56c6c #9e3232 3.66 ❌ 7.10 ✅ Tour guide headings on white
    15 $text-editor-gutter-color #777 #666 4.14 ❌ 5.31 ✅ Code editor line numbers on gutter background
    16 $node-selected-color #ff7f0e #0d74ce (Radix Blue 11) 2.53 ❌ 4.70 ✅ Selected node border stroke, selected wires, in-flight drag wires, palette hover ring
    17 $form-input-focus-color rgba(85,150,230,0.8) #0d74ce (Radix Blue 11) 1.51 ❌ 3.03 ✅ Focus indicators on all form inputs — ratio measured against unfocused border color per WCAG 2.4.11
    18 $diff-state-conflicted purple (CSS keyword) #8347ac 3.97 ❌ 4.74 ✅ Diff "conflicted" text on conflict row background

    Node selection: The original orange (#ff7f0e) failed at 2.53:1 against the white canvas. It was replaced with #0d74ce (Radix Blue 11, 4.70:1 ✅) using the existing selection mechanism — a stroke-width: 2 border applied via CSS on the node body rect when selected.

    Known trade-off: Blue on dark blue nodes has reduced contrast (~1.3:1). A single solid color cannot be fully compliant against all possible node fill colors. The node body border is treated as a UI component indicator under WCAG 1.4.11, where the 3:1 requirement applies against adjacent colors — it passes on the white canvas (4.70:1) which is the primary rendering surface.

    Exemptions: $secondary-text-color-disabled-* left unchanged — WCAG 1.4.3 explicitly exempts disabled UI components from contrast requirements.


    Visual Consistency Improvements

    These are refinements to the default theme. Small adjustments to color values, border weights, and border radii to improve visual consistency and align the palette with the Radix UI color scale. The overall character of the theme is unchanged.

    Summary of changes
    # Change Was Now Why
    1 $shade-color rgba(255,0,0,0.08) rgba(0,0,0,0.35) Increased opacity for a clearer distinction between the workspace and dialog header.
    2 $primary-text-color #555 #202020 (Radix Gray 12) Shifted toward Radix Gray 12 for stronger text-to-background contrast and better legibility.
    3 $header-text-color #444 #2d2d2d Darkened slightly so headings have a clear visual weight above body text.
    4 $shadow rgba(0,0,0,0.2) rgba(0,0,0,0.1) Softened to feel lighter and less prominent across panels.
    5 $primary-background #f3f3f3 #f0f0f0 (Radix Gray 3) Nudged to Radix Gray 3 to create a clearer separation between chrome surfaces and white content panels.
    6 $secondary-background-hover #e6e6e6 #e8e8e8 (Radix Gray 4) Aligned to Radix scale for consistency with the updated $primary-background.
    7 $primary-border-color #bbbbbb #d9d9d9 (Radix Gray 6) Lightened to Radix Gray 6 to give panels a more open, less rigid feel.
    8 $secondary-border-color #dddddd #e8e8e8 (Radix Gray 4) Aligned to Radix scale.
    9 $tertiary-border-color #ccc #cecece (Radix Gray 7) Aligned to Radix scale for interactive component borders.
    10 $form-input-focus-color rgba(85,150,230,0.8) #0d74ce (Radix Blue 11, solid) Switched to a solid value to match the blue used for links and selection throughout the UI. Also a compliance fix — see row 17 above.
    11 $popover-background #333 #1e1e1e Deepened for better contrast against tooltip text and a more refined appearance.
    12 $form-tips-background #ffe #fefbe9 (Radix Amber 2) Replaced the CSS shorthand with an explicit Radix Amber 2 value for a proper, consistent pale amber.
    13 $clipboard-textarea-background #F3E7E7 #f9f9f9 (Radix Gray 2) Moved to a neutral background to avoid any unintended association with error states.
    14 $node-status-colors red/green #c00 / #5a8 #dc3e42 / #30a46c (Radix Red 10 / Green 9) Updated CSS shorthand values to explicit Radix scale steps for better palette consistency.
    15 $link-unknown-color #f00 #ce2c31 (Radix Red 11) Aligned with the Radix Red palette used for errors and destructive actions throughout the UI.
    16 $diff-state-conflicted purple (CSS keyword) #8347ac Replaced the CSS keyword with an explicit value aligned to $diff-state-conflict. Darkened slightly to meet WCAG AA on the conflict row background — see row 18 above.
    17 $diff-merge-header-color #800080 #9b45ce Aligned with the conflict purple used throughout the diff view.
    18 Diff view backgrounds/borders Various Radix Green / Red / Amber steps Consolidated all diff background and border values onto the Radix scale to match their corresponding text colors.
    19 $notification-border-default #325C80 #5eb1ef (Radix Blue 8) Aligned to the blue family used across interactive and notification elements.
    20 $vcCommitShaColor #c38888 #5eb1ef (Radix Blue 8) Updated to a muted blue that suits the monospace/code context and aligns with the broader blue palette.
    21 $icons-flow-color #808080 #646464 (Radix Gray 11) Aligned to $secondary-text-color so flow icons share the same gray as other UI controls.
    22 Deploy button hover/active ramp #920f0f / #4C0A17 #a21212 / #7a0e0e Refined the hover and active states for a more gradual, consistent ramp.
    23 Button border-radius (mixins.scss) 3px 4px Unified all workspace buttons to 4px to match the deploy button and remove the subtle inconsistency.
    24 $list-item-background-selected #ffebc7 #dbeafe (Radix Blue 3) Moved from amber to Radix Blue 3 to align selection state with the established brand blue (#0d74ce) used for focus rings, links, and wires. Blue 3 chosen over Blue 4 to ensure secondary text (#646464) passes 4.5:1 at 4.85:1.
    25 $view-lasso-stroke #ff7f0e #0d74ce (Radix Blue 11) Aligned the drag-select lasso stroke with the selection blue used throughout the UI.
    26 $link-link-active-color #ff7f0e #0d74ce (Radix Blue 11) Aligned active link-node connection color with the selection blue.
    27 $node-border-unknown #f33 #ce2c31 (Radix Red 11) Replaced CSS shorthand with the explicit red used for errors and destructive actions throughout the UI.
    28 $node-config-background #f3f3f3 #f0f0f0 (Radix Gray 3) Unified with $primary-background to remove the one-step inconsistency.
  7. knolleary commented on Apr 14, 2026

    @knolleary
    MemberAuthor

    The one piece I'm stuck on is the blue used for selected nodes/links. I think it's too dark and doesn't provide enough contrast against the non-selected state. That's more relevant for links now that the selected border is a halo around nodes.

    WCAG 1.4.11 says contrast for non-text elements should be 3:1 - so I think we can afford to go lighter here than the 4.7 scoring #0d74ce

    What about #5EB1EF - radix Blue-8 ? It scores 3.1:1

    I will admit, I'm questioning about moving away from the existing orange (#ff7f0e) - I know it is unconventional, but it is what Node-RED has used for a long time - and scores 3.1:1 ... ⚔️

  8. n-lark commented on Apr 14, 2026

    @n-lark
    Contributor

    @knolleary Good call on the halo being too dark. I'm open to going lighter for $node-selected-color.

    However, Blue 8 (#5EB1EF) actually measures 2.33:1 against white, not 3.1, so it fails WCAG 1.4.11. (Note: if you're getting 3.1, you may be using an APCA/WCAG 3.0 tool which uses a different perceptual model, the ratios in the audit are all standard WCAG 2.x relative luminance per the W3C spec.) The lightest Radix Blue that clears 3:1 is:

    • Blue 9 (#0090ff) — 3.26:1 against white
    Image
    • Blue 10 (#0588f0) — 3.63:1 if we want more headroom
    Image

    On the orange, I get the attachment to it, but#ff7f0e fails at 2.53:1 (row 16 in the audit), so keeping it leaves the compliance gap we set out to close. A unified blue for selection, hover, and links also gives a more cohesive feel since we don't use orange anywhere else. If users push back, we could revisit with a compliant darker orange like Radix Orange 10 #ef5f00 (3.33:1) or Orange 11 #cc4e00 (4.51:1).

    Thoughts?

  9. knolleary commented on Apr 14, 2026

    @knolleary
    MemberAuthor

    My assistant has apologised for using the wrong contrast ratio formula. We're back on track.

    I'm struggling to see any meaningful difference between any of the 9 and 10 tones in the Radix colours. Lets go with Blue 9.

    I'll hold my orange thoughts in reserve.

  10. n-lark commented on Apr 14, 2026

    @n-lark
    Contributor

    Awesome - the change is pushed up. Appreciate the collaboration here! ❤️

  11. knolleary commented on Apr 15, 2026

    @knolleary
    MemberAuthor

    Closing with #5613 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions