A method and device for coding screen content into a bitstream by selecting a color palette table for a coding unit (CU) of screen content, creating a color index map having indices for the coding unit (CU), and encoding the selected color palette table and the color index map for the CU into a bitstream.