Skip to content

fix(color-manager): preserve manually-set vertex colors in Color by Vertex - #971

Merged
EdwardMoyse merged 1 commit into
mainfrom
fix/vertex-color-by-preserves-manual-colors
Jul 26, 2026
Merged

fix(color-manager): preserve manually-set vertex colors in Color by Vertex#971
EdwardMoyse merged 1 commit into
mainfrom
fix/vertex-color-by-preserves-manual-colors

Conversation

@EdwardMoyse

Copy link
Copy Markdown
Member

When applying "Color by Vertex", the vertex color should come from:

  1. Explicit vertex color in the event data (userData.color)
  2. Current material color (if user has manually set it via the UI)
  3. Deterministic golden-ratio color (fallback)

Previously, the code skipped step 2, so manually-set colors (e.g. green vertices) were replaced with deterministic colors when applying Color by Vertex to linked tracks. Now those manual colors are preserved.

Fixes the issue where setting Vertices_xAOD to green, then applying Color by Vertex to InDetTrackParticles_xAOD, would result in random-looking colors instead of the green tracks/vertices.

…ertex

When applying "Color by Vertex", the vertex color should come from:
1. Explicit vertex color in the event data (userData.color)
2. Current material color (if user has manually set it via the UI)
3. Deterministic golden-ratio color (fallback)

Previously, the code skipped step 2, so manually-set colors (e.g. green
vertices) were replaced with deterministic colors when applying Color by
Vertex to linked tracks. Now those manual colors are preserved.

Fixes the issue where setting Vertices_xAOD to green, then applying Color
by Vertex to InDetTrackParticles_xAOD, would result in random-looking
colors instead of the green tracks/vertices.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@EdwardMoyse
EdwardMoyse merged commit 4f74625 into main Jul 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant