* In color modes using a palette, {{Parameter|color&}} is the palette index of the new transparent color value or _NONE designates no clear colors.
* If {{Parameter|color&}} is not a valid palette index, an [[ERROR Codes|illegal function call]] error will occur.
* In 32-bit color modes, {{Parameter|color&}} is the [[_LONG]] color value of the new transparent color.
* If {{Parameter|Dest_Handle&}} is omitted, the destination is assumed to be the current write page. Zero can designate the current program screen.
''Usage:''
* If {{Parameter|Dest_Handle&}} is an invalid handle, then an [[ERROR Codes|invalid handle]] error is returned. Check for bad handle values of -1 first!
* In 32-bit color modes, it simply sets the Alpha to 0 for all pixels matching the specified color.
* In the second syntax, transparency is disabled for color modes using a palette.
* '''Note:''' [[_SETALPHA]] can affect any _CLEARCOLOR alpha setting within the color range set!
* '''NOTE: 32 bit [[_NEWIMAGE]] screen page backgrounds are transparent black or [[_ALPHA]] 0. Use [[_DONTBLEND]] or [[CLS]] for opaque!'''
''Example 1:'' Using _CLEARCOLOR to "mask" the background color of an image.
{{Cl|_PUTIMAGE}} , img&, 0 'place image without white background
{{Cl|PRINT}} {{Cl|_CLEARCOLOR}}(img&) 'displays closest clear color attribute
{{Cl|END}} '' ''
{{CodeEnd}}
: ''Note:'' The ''QB64.PNG'' image can be downloaded here: [https://dl.dropbox.com/u/8440706/QB64bee.png QB64bee.png]. Right click and Save as ''QB64bee.PNG''.
''Example 2:'' Using a _CLEARCOLOR transparency with images created on a [[_NEWIMAGE]] page. Does not require an image file.
{{CodeStart}}{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(512, 384, 32) ' screen uses handle value
{{Cl|CIRCLE}}(50, 50), 50, {{Cl|_RGB}}(128, 0, 0) ' create a red ball image
:''Note:'' If the _CLEARCOLOR [https://dl.dropbox.com/u/8440706/QB64bee.png QB64bee.png] background was not put onto a separate page, [[_SETALPHA]] would display it also.