Moved color conversion code from optimized to misc (fixed imports)