Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RPCXLib 1.1 Graphic Library for Clipper - <b>r_setrgb() </b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 R_SetRGB() 
 Changes the composition of a specific colour
------------------------------------------------------------------------------

 Syntax
        R_SetRGB ( nRegNr, nRed, nGreen, nBlue )

 Parameters
        nRegNr          Number of the colour register to change
                        (range 0-63; codes are in RPCXLib.CH)

        nRed            Units RED to be used   (range : 0-63)

        nGreen          Units GREEN to be used (range : 0-63)

        nBlue           Units BLUE to be used  (range : 0-63)

 Returns
        NIL

 Description
        Function R_SetRGB makes it possible to define ones own 16 Clipper
        colours. They can be replaced by self mixed colours.
        There are 64 x 64 x 64 = 262.144 (!) possible colours so almost
        any desired colour can be composed and used in applications.

 Example
        && Replace the Clipper colour GREEN by a self mixed colour.
        && The new colour is composed of 5 units RED, 30 units GREEN
        && and 30 units BLUE

        *-- RPCXLib definitions
        #include "RPCXLib.CH"

        R_SetRGB ( PL_GREEN, 5, 30, 30 )

        A nice example of interactive mixing of colours can be found
        in RPCXDemo.PRG.

See Also: R_GetRGB() R_DefPal() R_RestPal() R_SavePal()

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