A decoding method for a coding unit block having a plurality of pixels, the method comprising: receiving a flag corresponding to the coding unit block, a palette table (300, 800) corresponding to the coding unit block, and an index map (400, 900) corresponding to the coding unit block; in a palette mode, determining a state value of the flag corresponding to the coding unit block; characterized in further comprising: if the flag is a first state value, determining that the coding unit block does not include at least one escape pixel, that the amount of indexes of the palette table (300, 800) corresponding to the coding unit block is the amount of one or more major colors of the coding unit block, wherein the palette table does not include fields for an escape index, and that all colors of the plurality of pixels of the coding unit block are represented each by the one or more major colors of the coding unit block; if the flag is a second state value, determining that the coding unit block includes the at least one escape pixel, that the amount of the indexes of the palette table (300, 800) corresponding to the coding unit block is the amount of the one or more major colors of the coding unit block plus one, and that the color of at least one pixel among the pixels of the coding unit block is not represented by the one or more major colors of the coding unit block. receiving a flag corresponding to the coding unit block, a palette table (300, 800) corresponding to the coding unit block, and an index map (400, 900) corresponding to the coding unit block; in a palette mode, determining a state value of the flag corresponding to the coding unit block; characterized in further comprising: if the flag is a first state value, determining that the coding unit block does not include at least one escape pixel, that the amount of indexes of the palette table (300, 800) corresponding to the coding unit block is the amount of one or more major colors of the coding unit block, wherein the palette table does not include fields for an escape index, and that all colors of the plurality of pixels of the coding unit block are represented each by the one or more major colors of the coding unit block; if the flag is a second state value, determining that the coding unit block includes the at least one escape pixel, that the amount of the indexes of the palette table (300, 800) corresponding to the coding unit block is the amount of the one or more major colors of the coding unit block plus one, and that the color of at least one pixel among the pixels of the coding unit block is not represented by the one or more major colors of the coding unit block. if the flag is a first state value, determining that the coding unit block does not include at least one escape pixel, that the amount of indexes of the palette table (300, 800) corresponding to the coding unit block is the amount of one or more major colors of the coding unit block, wherein the palette table does not include fields for an escape index, and that all colors of the plurality of pixels of the coding unit block are represented each by the one or more major colors of the coding unit block; if the flag is a second state value, determining that the coding unit block includes the at least one escape pixel, that the amount of the indexes of the palette table (300, 800) corresponding to the coding unit block is the amount of the one or more major colors of the coding unit block plus one, and that the color of at least one pixel among the pixels of the coding unit block is not represented by the one or more major colors of the coding unit block.