FUNCTIONS CORE

GetClrFore()

Return the foreground color of a color value

Syntax

Signature
GetClrFore( cColor ) --> cForegroundColor

Arguments

cColor

Example

GetClrFore.prg
PROCEDURE Main()

   Check( 'GetClrFore( "W+/B" )                      ', GetClrFore( "W+/B" ), "W+" )
   Check( 'GetClrFore( GetClrPair( "W/N,GR+/R", 2 ) ) ', GetClrFore( GetClrPair( "W/N,GR+/R", 2 ) ), "GR+" )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output

GetClrFore( "W+/B" )                      OK
GetClrFore( GetClrPair( "W/N,GR+/R", 2 ) ) OK