14. ColorPaletteList

(1) ColorPaletteList

u32 color_palette_list_tag Describes the tags of the ColorPaletteList. Please set the tags shown below.

TAG_COLOR_PALETTE_LIST  0x00210000

u32 color_palette_list_header_size Describes the ColorPaletteList byte size.
u32 color_palette_list_size Describes the ColorPaletteList byte size.
u32 color_palette_num Describes the ColorPalette number.
u32 color_palette_num_byte Describes the ColorPalette byte size.
ColorPalette This is the ColorPalette area.

Go to the data chunk

(2) ColorPalette
u32 color_palette_tag Describes the tags of the color palette. Please specify the tags shown below.

TAG_COLOR_PALETTE       0x00210100

u32 this_color_palette_index Describes this ColorPalette index number.
u32 color_palette_size Describes the ColorPalette byte size.
u32 color_palette_name_index Uses a NameList index number to specify the ColorPalette name.
u32 color_num Describes the color number of ColorPalette. The following flags have been defined:

NIFF2_PALETTE_COLOR_16		0x00000010
NIFF2_PALETTE_COLOR_256		0x00000100

u32 color_type It is possible to specify either IA16 or RGBA16 for each 16-bit color in the palette. IA refers to Intensity Alpha data, and it is used with 8-bit intensity and 8-bit alpha. RGBA is used with 5-bit red, 5-bit green, 5-bit blue, and 1-bit and alpha. The following flags have been defined:

NIFF2_PALETTE_RGBA16		0x00000000
NIFF2_PALETTE_IA16		0x00000001

u32 reserved Please describe 0x0 as the default.
u32 color_array The actual palette data.

Actual color values are stored in order from palette number 0.

Since each color value is a 16-bit value, they are stored using the bid endian method in pairs in color_array.

Since the total number of colors in the palette is 16 when color_num = NIFF2_PALETTE_COLOR_NUM_16, color_array has 8 units of data: 0 ~ 7.

Since the total number of colors in palette is 256 when color_num = NIFF2_PALETTE_COLOR_NUM_256, color_array has 128 units of data: 0 ~ 127. In other words, color_array_num = 128.

Go to the data chunk