How to use C++ to change the colors of folders in unreal engine 5?

Take into account that the folder path needs to be in the format of "/Game/Maps" relative to the project which Unreal expects. You can’t use standard windows filenames like "D:\ProjectName\Content\Maps".

If you know how to use the Visual Studio debugging tools, you can make a breakpoint inside of AssetViewUtils::SaveColor and see what’s happening when you set the color manually in Unreal Editor to see what kind of folder names the function usually expects.