I'm developing a BlackBerry 10 mobile application using the momentics IDE (native SDK).
I want to change the background color of a container using C++. But unfortunately, relating to this [link], you only can define it like below :
**Creating a color in C++:**
Color c1 = Color::fromRGBA(0.5f, 1.0f, 0.2f, 0.8f);
Color c2 = Color::fromARGB(0xff996633);
For the color, I want to use the hex format ("#xxxxxx"). Any one can guide me on this ?
Color c2 = Color::fromARGB(0xff996633);
is using hex the0x is c++ representation of a hex code
. ff is the A component, 99 is the R, 66 is the G and 33 is the BSo if you want to use the hex value #000099 with no alpha
then it would be
The following code will convert a string to a hex value, you will need to remove the # from the string before hand however, and then can pass the string into the buffer object