split out colour codes into new class