You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support system accent color retrieval with UIColorType.Accent #4444
UISettings class allows retrieval of UIColorType.Accent and its darker and lighter versions. This can be supported on Android where system accent color can be set.
The accent color can potentially be anything (its "rules" are not clearly defined). We need to ensure that we don't use it as the "default accent" color, in case it would break accessibility (or adjust it by shifting the color to a safe range)
It will require adding some color helpers for RGB -> HSL conversion, so the color brightness can be changed properly to scale to darker/lighter
@davidjohnoliver we have that tracked in #3555 , that would be even more useful to support 👍 (I think most apps override accent color anyway). However, even if overwritten in resources, UISettings should still return the "system" color.
This issue was classified as not reproducible with a code sample or test.
Reason:UISettings.GetColorValue(UIColorType.Accent) exists but returns a hardcoded blue color instead of the actual Android system accent color. Getting the real system accent requires Android-specific APIs (TypedValue/R.attr.colorAccent) and a live Android device to verify — this cannot be tested with a self-contained runtime test.
Activity
MartinZikmund commentedon Nov 2, 2020
Gotchas:
davidjohnoliver commentedon Nov 2, 2020
Note that (according to UWP docs at least, I haven't tested) the base accent color can also be overridden by app code:
MartinZikmund commentedon Nov 2, 2020
@davidjohnoliver we have that tracked in #3555 , that would be even more useful to support 👍 (I think most apps override accent color anyway). However, even if overwritten in resources,
UISettingsshould still return the "system" color.jeromelaban commentedon Oct 21, 2021
Browsers also support this feature now: w3c/csswg-drafts#5187 (comment)
jeromelaban commentedon Apr 9, 2022
Now supported in major browsers: https://twitter.com/una/status/1506383666548822020
kucint commentedon May 13, 2024
@MartinZikmund: Uno currently only uses the default "windows" blue, and is ignoring the windows "accent-color", see #16608
Can this be fixed?
MartinZikmund commentedon Apr 7, 2026
Repro generator
This issue was classified as not reproducible with a code sample or test.
Reason:
UISettings.GetColorValue(UIColorType.Accent)exists but returns a hardcoded blue color instead of the actual Android system accent color. Getting the real system accent requires Android-specific APIs (TypedValue/R.attr.colorAccent) and a live Android device to verify — this cannot be tested with a self-contained runtime test.fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments
fix: Address accent color review comments