| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Exchanges the foreground and background color.
InvertAttr( <xColor> ) --> nInvertedAttribute
The function returns the color attribute of the inverted color as a numeric value
| See also: | NtoColor(), ScreenAttr() |
| Category: | CT:Video , Screen functions |
| Source: | ct\color.prg |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays a (inverted) color attribute and the
// corresponding SetColor() values.
PROCEDURE Main
LOCAL nColorAttr := GetClearA()
LOCAL nInvertAttr := InvertAttr( nColorAttr )
CLS
? nColorAttr // result: 7
? nInvertAttr // result: 112.00
? NToColor( nColorAttr , .T. ) // result: W/N
? NToColor( nInvertAttr, .T. ) // result: N/W
RETURN
http://www.xHarbour.com