# AG\_ATTRSUB
> [HTML Version](ag_attrsub.htm)
_Rewritten December 2023_
**tab(-10, AG\_ATTRSUB); attrtype, clrtype, fg'r, fg'g, fg'b, bg'r, bg'g, bg'b; chr(127);** [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.htm.md)
AG\_ATTRSUB (68) allows for changing the reverse or underline attribute to an arbitrary foreground/background color combination. It is useful for slight aesthetic improvement to legacy text-mode programs which use reverse video and underline, which may seem excessively retro for some tastes.
**Parameters**
_attrtype_
Attribute type: 0=reverse, 1=underline
_clrtype_
Type of color: 1=palette index, 2=RGB
_fg'r, fg'g, fg'b_
Foreground color. For _clrtype_ 1 (palette index), only fg'g and fg'b are ignored; fg'r is treated as the palette index (0-7 for foreground palette, 8-15 for reduced foreground). For _clrtype_ 2 (RGB), foreground red, green and blue RGB values.
_bg'r, bg'g, bg'b_
Background color. For _clrtype_ 1 (palette index), only bg'g and bg'b are ignored; bg'r is treated as the palette index (0-7 for background palette, 8-15 for reduced foreground)
For _clrtype _2 (RGB), foreground red, green and blue RGB values.
**Response**
None
**History**
2023 December, A-Shell 7.0.1752.2: bg'r value was previously (incorrectly) indexing the foreground rather than background palette when clrtype=1.