A video processing method is described. The method includes determining, for a conversion between a video unit of a video and a coded representation of the video, a maximum number of entries of a palette of representative values used during the conversion according to a rule; and performing the conversion using the palette, and wherein the rule specifies the maximum number of entries according to a characteristic of the video unit.