Well it is faster to.
color1.int_data =color2.int_data;
is faster or atleast as fast as
color1.r = color2.r;
color1.g = color2.g;
color1.b = color2.b;
color1.b = color2.a;
depending if the compiler spots the optimization it can do.
Not a very big optimization, granted, but an optimization non the less.
Or am i mistaken?
Also, the interface for the class would be identical would it not?
Everything is already hidden behind operator overloading and constructors. Only the rare cases when you want to access the data itself would it be "ugly" to use.
Lastly I would like to ask. Isn't making it a class excessive? I mean wouldn't a POD struct/union be enough. And then maybe use a function to create colors. like
CreateColor(GLUbyte r, GLUbyte r, GLUbyte r, GLUbyte a=255);
Making it a class creates a v_table for it doesn't it? Seems a bit unnecessary for something so simple as a color.
I hope I haven't come across as rude, I realy like your work. Just a few questions for my own personal education.