fix serializing color types
Added clipping for paste inside