Nano-X API Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# colours

## Name

colours —

## Synopsis

    void        GrGetSystemPalette              (GR_PALETTE *pal);
    void        GrSetSystemPalette              (GR_COUNT first,
                                                 GR_PALETTE *pal);
    void        GrFindColor                     (GR_COLOR c,
                                                 GR_PIXELVAL *retpixel);
    GR_COLOR    GrGetSysColor                   (int index);

## Description

## Details

### GrGetSystemPalette ()

    void        GrGetSystemPalette              (GR_PALETTE *pal);

Retrieves the system palette and places it in the specified palette structure.

`pal` : | pointer to a palette structure to fill in with the system palette

### GrSetSystemPalette ()

    void        GrSetSystemPalette              (GR_COUNT first,
                                                 GR_PALETTE *pal);

Sets the system palette to the values stored in the specified palette structure. The values before the specified first value are not set.

`first` : | the first palette value to set
`pal` : | pointer to a palette structure containing the new values

### GrFindColor ()

    void        GrFindColor                     (GR_COLOR c,
                                                 GR_PIXELVAL *retpixel);

Calculates the pixel value to use to display the specified colour value. The colour value is specified as a GR_COLOR, which is a 32 bit truecolour value stored as RGBX. The pixel value size depends on the architecture.

`c` : | the colour value to find
`retpixel` : | pointer to the returned pixel value

### GrGetSysColor ()

    GR_COLOR    GrGetSysColor                   (int index);

`index` : | an index into the server's colour look up table
Returns : | the colour found at the specified index

<<< Previous Page | Home | Up | Next Page >>>
pointer | regions