I need to write a function that draws pixels using 16 bit colour values. I am currently using following code to draw each pixels.
var pixel:Shape = new Shape();
pixel.graphics.beginFill(//16bit colour value);
pixel.graphics.drawRect (xVal, yVal, pixelWidth, pixelHeight);
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html
I need to apply 16 bit colour value (such as 111110000000000b, red colour) to above Graphics API function, however it seems like the function require 32 bit RGB colour value. I have also had a look at other possible approaches such as ...
BitmapData()
But it also requires 32 bit RGB values. Is there an API in AS3 that handles this issue? Or is there a formula that can seemingly convert a 16 bit colour value into a 32 bit colour value?