* The {{Parameter|attribute%}} is the palette index number of the color to set, ranging from 0 to 15 (4 bit) or 0 to 255 (8 bit) color modes.
* The [[LONG]] {{Parameter|newColor&}} is the new color value to set using [[_RGB32]] or [[_RGBA32]] values or using [[HEX$ 32 Bit Values]].
* If {{Parameter|destHandle&}} is omitted, [[_DEST|destination]] is assumed to be the current write page or screen surface.
* If {{Parameter|attribute%}} is outside of image or [[SCREEN|screen]] mode attribute range (0 to 15 or 0 to 255), an [[ERROR Codes|illegal function call]] error will occur.
* If {{Parameter|destHandle&}} does not use a palette, an [[ERROR Codes|illegal function call]] error occurs. '''Will not work in 24/32 bit color palette modes.'''
* If {{Parameter|destHandle&}} is an invalid handle value, an [[ERROR Codes|invalid handle]] error occurs.
<center>'''Basic's 16 Default Color Attributes (non-[[DAC]])'''</center>
{{OutputStart}}{{text| Attribute Description Red Green Blue 32 HEX HTML Name |Gold}}
0 Black 0 0 0 000000 Black
{{text| 1 Dark Blue 0 0 42 00008B DarkBlue|#00208B}}
{{text| 2 Dark Green 0 42 0 006400 DarkGreen|#006400}}
{{text| 3 Dark Cyan 0 42 42 008B8B DarkCyan|#008B8B}}
{{text| 4 Dark Red 42 0 0 8B0000 DarkRed|#8B0000}}
{{text| 5 Dark Magenta 42 0 42 8B008B DarkMagenta|#8B008B}}
{{text| 6 Dark Yellow 42 21 0 DAA520 GoldenRod|#DAA520}}
<center>[http://www.w3schools.com/html/html_colornames.asp HTML Color Table Values and Names] or [http://www.tayloredmktg.com/rgb/#OR Other RGB colors]</center>
::: ''Note:'' '''QB64''' 32 bit color intensity values from 0 to 255 can be found by multiplying above values by 4.
''Summary:'' The red, green, and blue intensity values can be changed using [[OUT]] or [[PALETTE]] statements. Some '''QBasic''' RGB color attribute values can be changed in [[DAC]] [[SCREEN (statement)|SCREEN]] modes and the [[DAC]] RGB intensity settings may be different.
{{PageExamples}}
''Example:'' Creating custom background colors in SCREEN 0 that follow the text. [[CLS]] makes entire background one color.