Refactored color conversion

Color conversion now lives in its own file