Basically, the sensor consists of three LEDs and Light Dependent Resistor (LDR). The LDR will detect the colour and display it to another RGB LED. Besides display it on the RGB LED, the colour will also display on PC. RGB LED is commonly used in display colours on LCD or OLED such as the monitor and television.
There are actually many methods to detect colour, but using only LED and LDR should be the cheapest way to do this job. First, the LDR has to detect the contrast between black and white surface. To detect the colour, each LED takes turn to shine onto the surface and the Arduino will read the voltage on LDR.
Finally, the colour value will be used to display it on another RGB LED. The output RGB LED requires Pulse Width Modulation (PWM) pin on the Arduino. Since the PWM output on Arduino is 8 bit, this gives 8 bit resolution, 255 steps on each colour. The output is also displayed on the PC. Arduino will communicate with the PC through serial communication and pass the colour value to Processing. Some calculations will be done on Processing and display the colour on PC.