In the adequate collection, add a color field. (adequate means in the categories it you want to color items by categories, or in the items collection if you want to color them independently)
Then add colors to the items.
Now when inside a collection list or a page template, when selecting an element, switch to the Settings tab. You’ll see you can use a dynamic color for backgrounds, borders or texts. (That’s also where you can define a dynamic background image).
Select the one you want then chose the field to bind.