In digital world colors are specified in Red-Green-Blue (RGB) format, with values of R, G, B varying on an integer…