style: update color variable definitions - #30
Merged
Merged
Conversation
Chrisliao0806
requested review from
Min-rou,
milk7472 and
yu025994
as code owners
August 13, 2026 02:07
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.
Description
Context
After rebasing
release/26P3_devontomain, the entire PwC brand color scheme appeared "dead" across the app — primary buttons, switches, sliders, progress bars, focus rings, and the chat submit button all lost their orange accent and rendered transparent/colorless.Root cause
The upstream rebase window included a color-system overhaul (LibreChat-AI#14670, LibreChat-AI#14709, LibreChat-AI#14734) that migrated all theme CSS variables to bare
R G Bchannel triplets, consumed asrgb(var(--x) / <alpha-value>).Our PwC theming commits were replayed correctly during the rebase, and every consumer was migrated to the new convention:
client/tailwind.config.cjs—'brand-primary': 'rgb(var(--brand-primary) / <alpha-value>)'client/src/style.css—.btn-primary { background-color: rgb(var(--brand-primary)); }client/src/style.css—--surface-submit: var(--brand-primary);(bothhtmland.darkblocks)However, the variable definitions were left in the old pre-rebase format as complete HSL color values:
Every consumer therefore resolved to
rgb(hsl(18 98% 51%) / 1)— invalid CSS that browsers silently drop, which killed the brand accent everywhere at once.Change
Single fix in
client/src/style.css: redefine the--brand-primarytrio as RGB triplets sourced from the PwC palette, matching the new system-wide convention.The
--brand-primary-*-hslchannel variables are kept, as the shadcn--ringtoken still consumes them viahsl(var(--ring)).Also audited during investigation (no further changes needed):
TwoFactorScreen,MCPConfigDialog,Fork,SkillToggle— originallybg-green-* → bg-brand-primary) are obsolete: upstream refactored those components onto semantic tokens (accent-primary,ring-primary,surface-submit), which already map to the PwC palette.pwc-orange-*utilities, dark-mode overrides, andclient/index.htmlare all intact and consistent with the triplet convention.Tests
npx tailwindcss -c tailwind.config.cjs -i src/style.css -o out.css) and verified the generated rules now form a valid chain:.bg-brand-primary→background-color: rgb(var(--brand-primary) / var(--tw-bg-opacity))--brand-primary: var(--pwc-orange-500)→ resolves torgb(253 81 8 / 1)(PwC orange).bg-brand-primary/20→rgb(var(--brand-primary) / 0.2)--brand-primaryas a complete color value (grepfor non-rgb()-wrapped usages acrossclient/srcandpackages/client/src).Instruction and/or command lines to reproduce your tests:
Then open the app and confirm the PwC orange accent on: login/confirm buttons, switches, sliders, progress bars, and the chat send button (light + dark mode).
Checklist
Before submitting this PR, please make sure (put X in square brackets):