c++ rgb code
#include <iostream>
// Define a struct to represent an RGB color
struct RGB {
int red;
int green;
int blue;
};
int main() {
// Create an instance of the RGB struct and initialize its values
RGB color;
color.red = 255;
color.green = 0;
color.blue = 128;
// Output the RGB values
std::cout << "Red: " << color.red << std::endl;
std::cout << "Green: " << color.green << std::endl;
std::cout << "Blue: " << color.blue << std::endl;
return 0;
}