Power Fx function
ColorValue — Power Fx function reference
Hex string to a color.
Syntax
powerfx
ColorValue( String )
Examples
powerfx
ColorValue("#742774")→ A color
powerfx
ColorValue("#742774")powerfx
ColorValue(cmbAccent.Selected.HexCode)
Common mistakes & gotchas
- Accepts 6-digit hex ("#RRGGBB") and CSS color names ("Red", "SkyBlue") but not RGBA()-style function syntax — use the separate RGBA() function for an alpha channel.
- An invalid or unrecognized string returns an error — validate hex values coming from user input or an external source before passing them in.
Related Power Fx functions
From Data conversion