- Go in to Material Preview mode by pressing Z and selecting the bottom option or selecting it from the top right of the Viewport.
- Go in to Edit Mode for your object with Tab.
- Select one face of your chosen colour group and press Ctrl+L to select linked faces.
- Create a New Material and go in to the Material Properties in the right hand panel.
- Set the Material to Diffuse in the Surface section.
- Set the color of your selection in the Color value.
- Click Assign to link that Material to your selection.
- Repeat these steps for the rest of your chosen color groups.