1690, from Sp.
pimiento "green or red pepper," also
pimienta "black pepper," from L.L.
pigmenta, pl. of
pigmentum "vegetable juice," from L.
pigmentum "pigment," from stem of
pingere "to paint" (see
paint). So called because it added a dash of color to food or drink.
"[I]n med.L. spiced drink, hence spice, pepper (generally), Sp. pimiento, Fr. piment are applied to Cayenne or Guinea pepper, capsicum; in Eng. the name has passed to allspice or Jamaica pepper. [OED]
The piece of red sweet pepper stuffed in a pitted olive so called from 1918, earlier
pimiento (1901), from Sp.