moved color functions over to separate file, and some other cleanup

Signed-off-by: Alexander Skjolden <alex@plastboks.net>