UButton::SetBackgroundColor
#include "Components/Button.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets the color and opacity multiplier applied to the button's background brush across all its visual states.
Caveats & Gotchas
- • Multiplies the existing per-state style brushes rather than replacing them — it won't fix a badly authored style, it only tints it.
- • Distinct from SetColorAndOpacity, which tints the button's content rather than its background.
Signature
UFUNCTION(BlueprintCallable, Category="Button|Appearance")
UMG_API void SetBackgroundColor(FLinearColor InBackgroundColor); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InBackgroundColor | FLinearColor | The color and opacity multiplier to apply to the button's background brush. | — |
Return Type
void Example
Tint the button background red C++
MyButton->SetBackgroundColor(FLinearColor::Red); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?