Created mask based on color code