Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>clrtable() color function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  CLRTABLE()                                                Color Function
 Purpose..: Display an inkey() menu of color combinations
-------------------------------------------------------------------------------
 Syntax...: ClrTable( <aClrTable> [, <cClr>] ) --> cResult

 Arguments: <aClrTable>   = color table object.
            [<cClr>]      = color string on which to start.

      ForeGround / BackGround Examples with Codes and Attributes
-------------------------------------------------------------------------------
  BackGround    ForeGround     Color            Codes      Attribute
-------------------------------------------------------------------------------
     Sample      Sample        Black            N    0       0 -  15
     Sample      Sample        Blue             B    1      16 -  31
     Sample      Sample        Green            G    2      32 -  47
     Sample      Sample        Cyan            BG    3      48 -  63
     Sample      Sample        Red              R    4      64 -  79
     Sample      Sample        Magenta         RB    5      80 -  95
     Sample      Sample        Brown           GR    6      96 - 111
     Sample      Sample        White            W    7     112 - 127

     Sample      Sample        Grey             N+   8     128 - 143
     Sample      Sample        Bright Blue      B+   9     144 - 159
     Sample      Sample        Bright Green     G+  10     160 - 175
     Sample      Sample        Bright Cyan     BG+  11     176 - 191
     Sample      Sample        Bright Red       R+  12     192 - 207
     Sample      Sample        Bright Magenta  RB+  13     208 - 223
     Sample      Sample        Yellow          GR+  14     224 - 239
     Sample      Sample        Bright White     W+  15     240 - 255
-------------------------------------------------------------------------------

 Returns..: <C> selected color string  <ForeGround>/<BackGround>

 Remark...: Graphics cards in 16 color EGA mode do not allow background
            colors to display in high intensity (128 and greater). The
            use of the high intensity attribute with background colors
            will cause the display to blink.

            The function can be used with a mouse.

 Source...: CLRTABLE.PRG
-------------------------------------------------------------------------------
 Example..: The example uses the function to set up a color
            table and return a color string, cPicked and the
            previous one, cClr.

   local aClrTable , cPicked, cClr
   aClrTable := MkClrTable( 5, 5, R_SPIN )
   cClr := wSetColor( , cPicked := ClrTable( aClrTable, wSetColor() ), WC_ALL )
   RmClrTable( aClrTable )

See Also: MkClrTable() RmClrTable() wSetColor()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson