Restore graph task and group coloring via Chakra palette tokens#68760
Draft
pierrejeambrun wants to merge 1 commit into
Draft
Restore graph task and group coloring via Chakra palette tokens#68760pierrejeambrun wants to merge 1 commit into
pierrejeambrun wants to merge 1 commit into
Conversation
Custom operator and TaskGroup colors disappeared in Airflow 3: the ui_color/ui_fgcolor attributes were kept but the new UI ignored them, so teams that relied on color to parse large graphs at a glance lost that signal (see the demand on the linked issue). Bring the coloring back in a way that fits the new opinionated theming: the value must be a Chakra palette token (e.g. blue.500), which resolves through a theme-controlled CSS variable and therefore stays legible in both light and dark mode and under custom themes -- the dark-mode and accessibility concerns that drove the original removal. The graph paints the node fill from ui_color and the operator label from ui_fgcolor, as in Airflow 2.x, while the border keeps showing run state. Legacy hex/named values can no longer adapt to the theme, so they are ignored by the graph and emit a warning for user-authored operators and task groups.
48c8d37 to
25bfaca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Custom operator and TaskGroup colors were dropped in Airflow 3 — the
ui_color/ui_fgcolorattributes were kept on operators and task groups but the new UI ignored them. This reintroduces the coloring in a way that fits the new opinionated light/dark theming.The value must now be a Chakra palette token (e.g.
blue.500,purple.600, or any token a deployment adds through custom theming). A token resolves through a theme-controlled CSS variable, so it stays legible in both light and dark mode — addressing the dark-mode / accessibility concerns that drove the original removal. The graph paints the node fill fromui_colorand the operator label fromui_fgcolor(as in Airflow 2.x), while the border keeps showing run state.Legacy hex / CSS-name values (e.g.
#e8b7e4) can't adapt to the theme, so they are ignored by the graph and emit a parse-time warning for user-authored operators and task groups (built-in operators and providers stay silent).closes: #54474
Graph (light)
Graph (dark)
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines