ALPHA

From QB64 Wiki
Revision as of 03:16, 17 July 2017 by imported>Odin (Created page with "The '''_ALPHA''' function returns the alpha channel transparency level of a color value used on a screen page or image. == Syntax == result& = '''_ALPHA'''(color~&[, imageHan...")
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.

Syntax

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

Example

<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>

Output:

Color 36
Alpha: 255