refact: refact the color_type to color.type, remove error handler.

color_type -> color.type
opacity_type -> opacity.type