-
Notifications
You must be signed in to change notification settings - Fork 178
[ColorProvider] Extending brand colors override functionality to macOS #2242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[ColorProvider] Extending brand colors override functionality to macOS #2242
Conversation
…d of replacing it
…ackward compatibility
| /// MARK: BrandColorProviding | ||
|
|
||
| - (UIColor *)brand10 { | ||
| return [UIColor colorNamed:@"Colors/DemoGreenBrand10Color"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you walk me through why we have these secondary definitions for brand colors in the iOS app, compared to what was already present?
| switch token { | ||
| case .comm10: | ||
| return Color(hexValue: 0x061724) | ||
| return Self.brandColorProvider.map { Color($0.brand10) } ?? Color(hexValue: 0x061724) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not make global tokens conditional; there are legit scenarios where a branded app may still want to access the default comm blue colors. All overrides should happen at the theme level for this reason.
Platforms Impacted
Description of changes
This PR extends the FluentUI theming system to support customizable brand colors through GlobalTokens, enabling apps to override the default Communication Blue color palette (brand10-brand160) with their own brand colors.
New Protocol - BrandColorProviding.swift:
TokenSet.swift:
FluentTheme.swift:
GlobalTokens.swift:
ColorProviding.swift (iOS):
ColorProviding.swift (macOS):
Colors.swift (macOS):
Demo Apps:
Binary change
[Pending]
Verification
Visual Verification
Pull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow