Adds an item with the cpesified color and value to the palette.
If an item with the same value already exists in the palette,
it is replaced by the new one. Note that internally the component sorts the
palette in ascending order so that you don't have to worry about the sequence
in which you insert items.