user38650: What is recommended color recognition sensor in the following two cases:

To determine the color of the floor while the robot is moving (multi-color line follower).
To determine the color of an object in distance 10cm at least.

For both cases above, I am looking for a sensor so that I can get values like (R: 252 , G: 217 , B: 0) not only red, green or blue as an result, and no problem with small errors.

user-1: You have a conceptual error. You don't need n wires to transmite n bits of information. If you use a serial protocol, one wire or two is enough to transmit information of any size: you just send one bit after another.
Just think: you are downloading sketchs in your Arduino thru a cable with only 4 wires ...
Most sensors (and modules) for Arduino use I2C or SPI to transmit commands/information in digital format. You can learn a lot in this tutorial that covers I2C, SPI and USB.
A quick search on Aliexpress show me this APDS-9960 sensor

The sensor provide ambient light and color measurement, proximity detection and non-contact gesture detection. The APDS-9960 has built in UV and IR blocking filters, four separate diodes sensitive to different directions, and an I2C compatible interface. 
Pins: VL (optional power to IR LED), GND (Ground), VCC (power to APDS-9960 sensor), SDA (I2C data), SCL (I2C clock), and INT (interrupt). Each APDS-9960 also has a detection range of 4 to 8 inches (10 to 20 cm).
It works with 3.3V.

38650: <p>What is recommended color recognition sensor in the following two cases:</p>

<ul>
<li><p>To determine the color of the floor while the robot is moving (multi-color line follower).</p></li>
<li><p>To determine the color of an object in distance 10cm at least.</p></li>
</ul>

<p>For both cases above, I am looking for a sensor so that I can get values like (R: 252 , G: 217 , B: 0) not only red, green or blue as an result, and no problem with small errors.</p>
 -1: <p>You have a conceptual error. You don't need <em>n</em> wires to transmite <em>n</em> bits of information. If you use a <em>serial protocol</em>, one wire or two is enough to transmit information of any size: you just send one bit after another.</p>

<p>Just think: you are downloading sketchs in your Arduino thru a cable with only 4 wires ...</p>

<p>Most sensors (and modules) for Arduino use I2C or SPI to transmit commands/information in digital format. You can learn a lot in this <a href="http://www.deviceplus.com/how-tos/arduino-guide/arduino-communication-protocols-tutorial/" rel="nofollow noreferrer">tutorial</a> that covers I2C, SPI and USB.</p>

<p>A quick search on Aliexpress show me this APDS-9960 sensor</p>

<p><a href="https://i.stack.imgur.com/KYM8i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KYM8i.png" alt="APDS-9960 sensor"></a></p>

<p>The sensor provide ambient light and color measurement, proximity detection and non-contact gesture detection. The APDS-9960 has built in UV and IR blocking filters, four separate diodes sensitive to different directions, and an I2C compatible interface. </p>

<p>Pins: VL (optional power to IR LED), GND (Ground), VCC (power to APDS-9960 sensor), SDA (I2C data), SCL (I2C clock), and INT (interrupt). Each APDS-9960 also has a detection range of 4 to 8 inches (10 to 20 cm).</p>

<p>It works with 3.3V.</p>
