© Neil Cameron 2019
Neil CameronArduino Appliedhttps://doi.org/10.1007/978-1-4842-3960-5_14

14. Sensing Colors

Neil Cameron1 
(1)
Edinburgh, UK
 
A color can be defined as a combination of red, green, and blue components, as shown in Figure 14-1. One byte or 8 bits is used to store each of the red, green, and blue values with 28 = 256 possible values for each of the red (R), green (G), and blue (B) components of the compound color. For example, magenta has a (255, 0, 255) RGB format.
../images/471900_1_En_14_Chapter/471900_1_En_14_Fig1_HTML.jpg
Figure 14-1

RGB color values

Red Green Blue (RGB) LED

../images/471900_1_En_14_Chapter/471900_1_En_14_Figa_HTML.jpgAn RGB LED consists ...

Get Arduino Applied: Comprehensive Projects for Everyday Electronics now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.