How to assign a color to a file type

Is there a way to assign a font color by file type?

What I’m trying to do

I would like to be able to assign different colors to different file types in the TREE and FOLDER views.