Added decodeColor function.