- u.c[0] = static_cast<unsigned char>(cr*255);
- u.c[1] = static_cast<unsigned char>(cg*255);
- u.c[2] = static_cast<unsigned char>(cb*255);
- u.c[3] = static_cast<unsigned char>(ca*255);
+ u.c[0] = static_cast<unsigned char>(col.r*255);
+ u.c[1] = static_cast<unsigned char>(col.g*255);
+ u.c[2] = static_cast<unsigned char>(col.b*255);
+ u.c[3] = static_cast<unsigned char>(col.a*255);