SImage ColorAndOpacity not working

I have the following code to create a full screen gray image:

ChildSlot
[
    SNew(SOverlay)
    + SOverlay::Slot().HAlign(HAlign_Fill).VAlign(VAlign_Fill)
    [
        SNew(SImage).ColorAndOpacity(FLinearColor(0.5f, 0.5f, 0.5f, 1.0f))
    ]
];

and the image looks like this:

Can you please help me understand why I have the little squares and how may I get the solid gray color I’m expecting to get for:

FLinearColor(0.5f, 0.5f, 0.5f, 1.0f)

SImage needs a image to work, what you see is placeholder for image. ColorAndOpacity is controlling the tint of image which you don’t have loaded. You need to set a image and you can use FSlateColorBrush set the single color as a image

You can also use SBorder instead and set background color, SBorder can also contain widgets