| title | fxGetHexFromColor | ||||
|---|---|---|---|---|---|
| description | User-defined function to convert a Power Apps Color value to a hex string | ||||
| category | colors/functions | ||||
| tags |
|
||||
| related |
|
Paste this code into your App.Formulas and call it to convert a ColorValue to a hex string.
fxGetHexFromColor(ColorValue:Color, IncludeAlpha:Boolean):Text = (
With(
{
MyVal: Substitute(
JSON(ColorValue),
"""",
""
)
},
Left(MyVal, Len(MyVal) - 2)
)
);
fxGetHexFromColor(ColorValue:Color):Text = Left(
Substitute(
JSON(ColorValue, JSONFormat.Compact),
"""",
""
),
7
);
| Date | Author | Changes |
|---|---|---|
| 2026-01-27 | Migration | Initial TOC and history section added |