Original Post
What is the best way to go about making a Colour class. I am thinking of three different ways: * Store r,g,b,a as separate byte fields and, if needed, pack all 3 into an int * Store as int; a=[31-24], r=[23-16], g=[15-8], b=[7-0] and use masking/shifting to extract bits. * Use bit-fields I think the last would be the best (fastest) wouldn't it? Say i had this: What order is that in, is 'a' [31-24] or [7-0]? thanks
unsigned {
a : 8
r : 8
g : 8
b : 8
}