Hex code to RGB

This is quite new (because ChatGPT is new):

So now my advice would be to install C++ Create C++ project.
Ask chat GPT to make whole function for yoursaelf.
Copy paste code from chat to CPP
And compile.

Even for me (I know CPP) this is really fast way to make those small C++ functions.
Usually at worst it is matter of fixing singe bug in what chat made. But then you do not have those 20-30 weird functions that do very simple things, instead you have single (or two) files in C++ with single class.

Example of this (I did not check this function for bugs, chat does them often, so be sure to check it):

my prompt:
Create function for unreal 5, that converts Text variable (containing hex values of color RGBA) into unreal linear color. Expose Color as text and resulting linear color to blueprints. Make this function Pure. IT should have linear color input variable that represents “error color” and if translation of input text cannot be done to linear color, set result as that error color. This should be C++ function.

Chat first result:

“ColorConversionLibrary.h:”

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "ColorConversionLibrary.generated.h"

UCLASS()
class YOURPROJECT_API UColorConversionLibrary : public UBlueprintFunctionLibrary
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintPure, Category = "Color Conversion")
    static FLinearColor HexToLinearColor(const FText& ColorText, const FLinearColor& ErrorColor);
};

“ColorConversionLibrary.cpp:”

#include "ColorConversionLibrary.h"

FLinearColor UColorConversionLibrary::HexToLinearColor(const FText& ColorText, const FLinearColor& ErrorColor)
{
    FString ColorString = ColorText.ToString();
    FLinearColor Result;

    if (ColorString.StartsWith("#"))
    {
        ColorString.RemoveAt(0); // Remove the '#' character

        // Convert the remaining string to FColor
        FColor ParsedColor;
        if (ParsedColor.InitFromString(ColorString))
        {
            Result = ParsedColor;
        }
        else
        {
            Result = ErrorColor;
        }
    }
    else
    {
        Result = ErrorColor;
    }

    return Result;
}

And bonus is you will get used to C++. With second bonus: all code in blueprints gets much more maintainable.