[Feature Request] Add accent color to host data in Widgets board
Problem Statement
It would be great to be able to create highly personalized widgets by using accent colors.
Proposed solution
I think that it should be show at host data as an hexadecimal string, so that host data looks like this:
{
"widgetSize": "small",
"hostTheme": "light"
"accentColor": "#0067C0"
}
Using # maybe could lead into problems (i.e. using this field as fill color in svgs), %23 solves them.
Should be the same color than "+" buttons at "Add widgets" section on the widgets board and should be updated whenever the color changes, just like the "+" button does.
It should be added also to the designer sample host data.
Maybe ActionSet buttons and Hyperlink texts at RichTextBlock should use this accent color too.
Alternatives or Workarounds
Right now, in the app I'm developing, I use the following code to get the accent color to later dump it to the widget data:
var uiSettings = new UISettings();
var accentColor = uiSettings.GetColorValue(UIColorType.AccentLight2).ToString();
// I use UIColorType.AccentLight2 when dark theme is used and UIColorType.AccentDark1 when light theme is used
The problem with this is that when using the listener UISettings.ColorValuesChanged to track accent color changes, I can't find a Dispatcher that allows me to use uiSettings.GetColorValue(...) so this workaround isn't fully functional.
I have created this feature request too in the Feedback hub: https://aka.ms/AAjonzv
@JeanRoca - care to take a look?
Any updates on this?