Colorants are compounds that are used to impart color to a substance. A colorant can be a dye, an ionized…