added proper color support. Not really optimized, but it will do.