The colors in ILogger implementation are decided based on the LogLevel that is being logged. The code for EF Core is in class called ConsoleLoggerProvider. Colors are hardcoded and depend on the LogLevel. If you want to specify the colours yourself you would need to implement ILogger yourself. It's a pretty simple interface but as a reference this post gives you an example.
1.Set Kestrel Output Color from ILogger
2.How to add custom Console Output Color logging in ASP.NET Core