Microsoft.FluentUI.AspNetCore.Components.Color to Hex? #2762
-
How do I use Microsoft.FluentUI.AspNetCore.Components.Color[s] in a component like
I need a ToHex() method (or what's a better way). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The whole idea is that you do not have to deal with the hex value. The accent color is set to a value through the script and the AccentFillRest design token which then translates to setting the CSS var --accent-fill-rest. |
Beta Was this translation helpful? Give feedback.
The whole idea is that you do not have to deal with the hex value. The accent color is set to a value through the script and the AccentFillRest design token which then translates to setting the CSS var --accent-fill-rest.
You can get the associated CSS var name by using out
ToAttibuteValue()
enum extension method.