mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
feat(healthchat): paint the subtle gradient in brand blue
This commit is contained in:
@@ -28,6 +28,7 @@ struct HealthChatCompoundHook: CompoundHookProtocol {
|
||||
\.textActionAccent,
|
||||
\.textLinkExternal,
|
||||
\.borderInteractivePrimary,
|
||||
\.borderAccentPrimary,
|
||||
\.textBadgeAccent
|
||||
]
|
||||
let solidUIColorTokens: [KeyPath<CompoundUIColorTokens, UIColor> & Sendable] = [
|
||||
@@ -39,6 +40,7 @@ struct HealthChatCompoundHook: CompoundHookProtocol {
|
||||
\.textActionAccent,
|
||||
\.textLinkExternal,
|
||||
\.borderInteractivePrimary,
|
||||
\.borderAccentPrimary,
|
||||
\.textBadgeAccent
|
||||
]
|
||||
for keyPath in solidColorTokens {
|
||||
@@ -63,6 +65,19 @@ struct HealthChatCompoundHook: CompoundHookProtocol {
|
||||
colors.override(keyPath, with: Color(brand))
|
||||
}
|
||||
|
||||
// Subtle gradient (home screen bloom, highlighted timeline item) → brand blue fading out,
|
||||
// at the opacities Compound uses for its green stops. Stop 6 stays transparent.
|
||||
let subtleGradientTokens: [KeyPath<CompoundColorTokens, Color>] = [
|
||||
\.gradientSubtleStop1,
|
||||
\.gradientSubtleStop2,
|
||||
\.gradientSubtleStop3,
|
||||
\.gradientSubtleStop4,
|
||||
\.gradientSubtleStop5
|
||||
]
|
||||
for (keyPath, opacity) in zip(subtleGradientTokens, [0.41, 0.23, 0.11, 0.06, 0.03]) {
|
||||
colors.override(keyPath, with: Color(brand).opacity(opacity))
|
||||
}
|
||||
|
||||
// Subtle accent backgrounds (paired with accent-coloured foregrounds) → brand tint.
|
||||
let tintColorTokens: [KeyPath<CompoundColorTokens, Color>] = [
|
||||
\.bgAccentSelected,
|
||||
|
||||
Reference in New Issue
Block a user