How can I assign a colour to a var?how to compare pixel colours?

hi i have a game that i am working on but i have a problem i want to colour detector pixels around the object but i don’t know what to do i don’t know how can i get a pixel colour and compare if you think there is another method please tell me thanks.

I need help to understand how the locores code of this part of my application works to edit and change it
and where I find a color chart to put the new ones and guide me:

//Change the following values

Color3B ConfigManager::preloader_color = Color3B(0xa7, 0x73, 0xd5);
Color3B ConfigManager::primary_color = Color3B(0x42, 0x43, 0x4F);
Color3B ConfigManager::secondary_color = Color3B(0x8E, 0x4E, 0x95);
Color3B ConfigManager::dialog_color = Color3B(0x34, 0x62, 0xa1);
Color3B ConfigManager::levels_primary_text_color = Color3B(0xc8, 0x28, 0x73);
Color3B ConfigManager::levels_secondary_text_color = Color3B(0x75, 0x75, 0x75);
Color3B ConfigManager::game_bg_color = Color3B(0xb9, 0x1f, 0x58);
Color3B ConfigManager::letter_btn_selected_color = Color3B(0xc8, 0x87, 0xe5);
Color3B ConfigManager::level_complete_particle_color_a = Color3B(0xcc, 0xa9, 0x55);
Color3B ConfigManager::level_complete_particle_color_b = Color3B(0xff, 0xff, 0xff);

you can draw it onto a canvas then use getImageData

Acquired from this thread