* 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.
{{PageDescription}}
* 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.'''
{{PageExamples}}
''Example 1:'' Using _CLEARCOLOR to "mask" the background color of an image.
{{CodeStart}}
{{Cl|SCREEN (statement)|SCREEN}} 13
img& = {{Cl|_LOADIMAGE}}("qb64_trans.png")
{{Cl|_PUTIMAGE}} , img&, 0 'place actual image with background
K$ = INPUT$(1)
{{Cl|CLS}} , {{Cl|_RGB}}(255, 0, 0) 'clear screen with red background