I would like to discuss a similar command as DECRQSS that would be recommended to be implemented by commonly used terminals across different OS.
That way there would be a reliable way to detect actual color support. For now it's not reliable at all by checking for environment variables.
I did not yet think of an ideal solution and would first like to know if there's interest in drafting such command.