# EasyColorComponent

| Support            | ![](assets/images/sample_programs/applies_to/cpp.svg) ![](assets/images/sample_programs/applies_to/cs.svg) ![](assets/images/sample_programs/applies_to/qt.svg) ![](assets/images/sample_programs/applies_to/vb.svg) ![](assets/images/sample_programs/applies_to/python.svg)   |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Required licenses  | **EasyImage**                                                                                                                                                                                                                                                                   |
| Recommended images | Any image from the folder `Sample Images/EasyColor`                                                                                                                                                                                                                             |
| Location           | `Image Processing/Basic` or `Console samples/Image Processing` *with Python*                                                                                                                                                                                                    |

## Purpose

This sample program demonstrates how to:

* Retrieve one component of a color image after converting it from RGB to a given color space.

![](assets/images/sample_programs/image_processing-easycolorcomponent.webp)

## Code highlights

1. Configure the color lookup table for converting RGB to another color space (ISH in this case).
   ```c++
   m_ColorLookup.ConvertFromRgb(EColorSystem_Ish);
   ```
2. Retrieve a component from a color image using the conversion configured in the color lookup table.
   ```c++
   EasyColor::GetComponent(&m_Src, &m_Dst, m_un32Component, &m_ColorLookup);
   ```
