Navigation
API > API/Runtime > API/Runtime/SlateCore
A Slate color can be a directly specified value, or the color can be pulled from a WidgetStyle.
| Name | FSlateColor |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Styling/SlateColor.h |
| Include Path | #include "Styling/SlateColor.h" |
Syntax
USTRUCT (BlueprintType )
struct FSlateColor
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateColor
(
ESlateColorStylingMode InColorUseRule |
Private constructor to prevent construction of invalid FSlateColors. | Styling/SlateColor.h | |
FSlateColor
(
const TSharedRef< FLinearColor >& InColor |
Creates a new Slate color that is linked to the given values. | Styling/SlateColor.h | |
FSlateColor
(
const FColor InColor |
Creates a new Slate color with the specified values. | Styling/SlateColor.h | |
FSlateColor
(
const FLinearColor& InColor |
Creates a new Slate color with the specified values. | Styling/SlateColor.h | |
FSlateColor () |
Default constructor.Uninitialized Slate colors are Fuchsia by default. | Styling/SlateColor.h | |
FSlateColor
(
EStyleColor InColorTableId |
Styling/SlateColor.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ColorTableId | EStyleColor | Id to a color in a color table to be used with ESlateColorStylingMode::UseColor_ColorTable. | Styling/SlateColor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FLinearColor & GetColor
(
const FWidgetStyle& InWidgetStyle |
Gets the color value represented by this Slate color. | Styling/SlateColor.h | |
| Gets the specified color value. | Styling/SlateColor.h | ||
bool IsColorSpecified () |
Checks whether the values for this color have been specified. | Styling/SlateColor.h | |
bool SerializeFromMismatchedTag
(
const FPropertyTag& Tag, |
Used to upgrade an FColor or FLinearColor property to an FSlateColor property | Styling/SlateColor.h | |
void Unlink () |
If the color rule is set to UseColor_Specified_Link, this will copy the linked color internally, unlink it and set the color rule to UseColor_Specified. | Styling/SlateColor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FLinearColor & GetColorFromTable() |
Styling/SlateColor.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FSlateColor UseForeground() |
Styling/SlateColor.h | ||
static FSlateColor UseStyle() |
Styling/SlateColor.h | ||
static FSlateColor UseSubduedForeground() |
Styling/SlateColor.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FSlateColor& Other |
Compares this color with another for inequality. | Styling/SlateColor.h | |
bool operator==
(
const FSlateColor& Other |
Compares this color with another for equality. | Styling/SlateColor.h |