##### Ninja Library - Texture Function

# njSetPaletteMode

Sets palette color mode

### FORMAT

`

  void njSetPaletteMode( mode )
  Uint32 mode

`

### PARAMETER

  `mode` | Palette color mode
  `` | NJD_TEXFMT_ARGB_1555
  `` | NJD_TEXFMT_RGB_565
  `` | NJD_TEXFMT_ARGB_4444
  `` | NJD_TEXFMT_ARGB_8888

### RETURN

  None

### DESCRIPTION

  Sets the palette color mode. Be sure to execute this before loading palette data with the `njSetPaletteData()` function. Normally, the color mode is set in the NJS_TEXPALETTE structure when loading palette data with the `njLoadPaletteFile()` function.

### EXAMPLE

      The following loads palette file and set color mode.
      Uint16 palette[256];
      NJS_TEXPALETTE pl={palette,0,0,0,0};
      njLoadPaletteFile("palette.pvp",&pl);
      /* Set mode set in palette.pvp file */
      njSetPaletteMode(pl.mode);
      /* Load palette data */
      njSetPaletteData(pl.offset,pl.count,pl.palette);

### NOTE

  The mode is maintained until the setting is changed. Before executing `njLoadPaletteFile()` function, be sure to set the palette color mode.

### REFERENCE

  `njSetPaletteData()
  njLoadPaletteFile()
  `

njSetPaletteMode

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999