2. I want to get a hexadecimal value as my output instead of the RGB values. I have tried changing "DEC" to "HEX" in all "Serial.print" commands but that didn't work. I also tried incorporating a separate decimal to hex conversion function but even that didn't work.
it gives a 5 digit value which is not a hexadecimal value of the rgb obtained.