Various bits mostly related to colour conversions.