From QB64 Wiki
Revision as of 01:38, 18 July 2017 by imported>Odin
Jump to navigation Jump to search

The _ALPHA function returns the alpha channel transparency level of a color value used on a screen page or image.


result& = _ALPHA(color~&[, imageHandle&])


<source lang="qbasic"> SCREEN 13

clr~& = _RGBA(255, 0, 255, 192) 'returns closest palette color attribute PRINT "Color:"; clr~&

COLOR clr~& PRINT "Alpha:"; _ALPHA(clr~&)

END </source>


Color: 36
Alpha: 255