Skip to content

fix(ui): use distinct color palette for group tags - #2759

Merged
seefs001 merged 1 commit into
QuantumNous:mainfrom
KiGamji:fix-group-colors
Feb 2, 2026
Merged

fix(ui): use distinct color palette for group tags#2759
seefs001 merged 1 commit into
QuantumNous:mainfrom
KiGamji:fix-group-colors

Conversation

@KiGamji

@KiGamji KiGamji commented Jan 27, 2026

Copy link
Copy Markdown
Contributor
image

Custom groups are now perfectly distinguishable using colors from hashes.

Summary by CodeRabbit

  • Improvements
    • Enhanced group tag color display with an improved color distribution algorithm, providing better visual distinction and higher contrast for more consistent and identifiable group tags throughout the application.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The changes introduce a new color utility function groupToColor() that hashes group strings and maps them to a palette of colors with better contrast. The renderGroup() function now uses this new utility instead of the previous stringToColor() for determining default tag colors. Minor formatting adjustments are also present in model filter definitions.

Changes

Cohort / File(s) Summary
Color Grouping Utility
web/src/helpers/render.jsx
Added groupColors palette array and new public function groupToColor(str) for hash-based color mapping. Updated renderGroup() to use groupToColor() instead of stringToColor() for default tag colors. Minor formatting edits in model filter lines.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A palette of hues, now grouped with care,
Colors distributed with hash-based flair,
No more drab tags in the rendering light—
The rabbit hops bright with contrasts so right! 🎨✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ui): use distinct color palette for group tags' accurately describes the main change: replacing the color scheme for group tags with a new distinct palette.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KiGamji

KiGamji commented Jan 27, 2026

Copy link
Copy Markdown
Contributor Author

closes #2593 btw

@seefs001
seefs001 merged commit 6c0e940 into QuantumNous:main Feb 2, 2026
1 check passed
@seefs001

seefs001 commented Feb 4, 2026

Copy link
Copy Markdown
Collaborator

在我这边出现了几个颜色相同的靠在一起,甚至不如之前的观感,还没有看是什么问题,暂时先revert了

@KiGamji

KiGamji commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

在我这边出现了几个颜色相同的靠在一起,甚至不如之前的观感,还没有看是什么问题,暂时先revert了

maybe making it configurable is the best option...

ennnnny pushed a commit to ennnnny/new-api that referenced this pull request Mar 17, 2026
fix(ui): use distinct color palette for group tags
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.

2 participants