SET_WARN_COLOR((%FLinearColor), *Colour); -- NOT WORKING!!!

I’m trying to set the log color in the server’s terminal through a Blueprint function, but I don’t know how to make a non-constant variable in SET_WARN_COLOR.
Captura de tela 2022-11-15 224353

Captura de tela 2022-11-15 224326

Captura de tela 2022-11-15 233617

You can’t just pass in an FLinearColor for that. You have access to the engine source, step into the macro and see how it actually works.

/*-----------------------------------------------------------------------------
Colorized text.

To use colored text from a commandlet, you use the SET_WARN_COLOR macro with
one of the following standard colors. Then use CLEAR_WARN_COLOR to return
to default.

To use the standard colors, you simply do this:
SET_WARN_COLOR(COLOR_YELLOW);

You can specify a background color by appending it to the foreground:
SET_WARN_COLOR, COLOR_YELLOW COLOR_DARK_RED);

This will have bright yellow text on a dark red background.

Or you can make your own in the format:

ForegroundRed | ForegroundGreen | ForegroundBlue | ForegroundBright | BackgroundRed | BackgroundGreen | BackgroundBlue | BackgroundBright
where each value is either 0 or 1 (can leave off trailing 0's), so
blue on bright yellow is "00101101" and red on black is "1"

An empty string reverts to the normal gray on black.
-----------------------------------------------------------------------------*/

// putting them in a namespace to protect against future name conflicts
namespace OutputDeviceColor
{
	const TCHAR* const COLOR_BLACK = TEXT("0000");

	const TCHAR* const COLOR_DARK_RED = TEXT("1000");
	const TCHAR* const COLOR_DARK_GREEN = TEXT("0100");
	const TCHAR* const COLOR_DARK_BLUE = TEXT("0010");
	const TCHAR* const COLOR_DARK_YELLOW = TEXT("1100");
	const TCHAR* const COLOR_DARK_CYAN = TEXT("0110");
	const TCHAR* const COLOR_DARK_PURPLE = TEXT("1010");
	const TCHAR* const COLOR_DARK_WHITE = TEXT("1110");
	const TCHAR* const COLOR_GRAY = COLOR_DARK_WHITE;

	const TCHAR* const COLOR_RED = TEXT("1001");
	const TCHAR* const COLOR_GREEN = TEXT("0101");
	const TCHAR* const COLOR_BLUE = TEXT("0011");
	const TCHAR* const COLOR_YELLOW = TEXT("1101");
	const TCHAR* const COLOR_CYAN = TEXT("0111");
	const TCHAR* const COLOR_PURPLE = TEXT("1011");
	const TCHAR* const COLOR_WHITE = TEXT("1111");

	const TCHAR* const COLOR_NONE = TEXT("");
}