Encode color code in order to reduce data size