text.skipToContent text.skipToNavigation

Color Sensor Technology

Color sensors recognize and distinguish colors on a wide range of materials and surfaces. Using an RGB receiver, they analyze the light reflected by an object and break it down into its spectral components to determine the color. This enables reliable color control, object detection and sorting.

How Do Color Sensors Work?

Color sensors illuminate objects with white light and measure the intensity of the reflected light in the three spectral ranges red, green and blue. These intensities result in three digital signal values, which represent the physical strength of the received light in each channel. The ratio of these three channels describes the color reflected by the object. The intensities of the three channels are compared with each other and from these ratios a color profile is created, which is compared with previously learned references. On this basis, the sensor switches when a defined color is detected.

Why Do Color Sensors Work with White Light?

The white light LED generates a continuous spectrum. This light is reflected by the object and contains all parts relevant for color recognition. Thus, each color is illuminated under constant spectral conditions. A higher switching speed is also possible, as the sensor permanently emits the same light color and can evaluate it directly.

What Do RGB and HSL Stand for?

Color sensors detect the light reflected from a surface and convert it into measurable color values. These values can be displayed in different color spaces, for example in the RGB color space or in the HSL color space. This allows colors to be precisely recorded, compared and evaluated for quality control or object detection.

RGB Color Space

RGB is the technical description of a color based on the measurable intensities of the three basic colors of visible light: Red, green and blue. Each visible color is created by combining these three colors, which is why we speak of an additive color space. When all three color channels are mixed at the same intensity, gray tones up to white are produced, while a dominant color channel results in a strong, saturated color.

HSL Color Space

HSL is a transformation of RGB values into a form that is closer to human perception and therefore more intuitive to use. In the HSL color space, a color is described by color shade (hue), saturation (saturation) and brightness (lightness). The shade corresponds to the appropriate color angle in the color wheel, such as orange, green or blue, while the saturation describes, how intense a color appears, from a gray, desaturated tone to a bold, pure shade. Brightness indicates how light or dark a color is, from black to medium brightness to white.

How Are the Signal Values of Color Sensors to Be Understood?

The measured RGB channel signals are raw values of the sensor and are typically in the range of 0 to 1023. These values must be clearly distinguished from the standardized standard RGB colors (also sRGB colors), such as those used in the image display. Direct conversion is not possible because the signals depend on illumination, object distance, material and angle of incidence. RGB thus forms the technical basis for color recognition and describes what the sensor physically measures. 

For further processing, these RGB raw data are converted into the HSL color space in the sensor. As a result, the color proportions can also be evaluated according to color shade, saturation and brightness. This conversion enables a perceptual interpretation of the measured values and simplifies parameterization: Instead of individual channel values, the color shade, color intensity and brightness can be set and evaluated in a targeted manner. 

Color sensors like the P1PF are detection sensors, not color meters. This means that they verify whether or not learned color profiles exist. To ensure reliable detection, there should be a sufficiently large difference between the color nuances.

How Do Color Sensors Differ from Contrast Sensors with White Light?

Color sensors and contrast sensors basically work according to similar optical principles, but differ in their application, signal processing and flexibility of parameterization. 

Typical Industries for Color Sensors

Automotive Industry

Food Industry

Packaging Industry

Printing Industry

Notes on Mounting Color Sensors

A slightly inclined installation of the sensor with an angle of up to 10° is recommended. 
Product Comparison