You’ll need to copy this function too, and feel free to tweak it if you want. For example, remove the border-radius line to get squares instead of circles. Or remove the .color-preview:hover rule to have static previews.
One of my favorite color resources coolors.co. It gives you a palette of random colors, like #414073 or #70a37F. You can press the space bar to get new colors, or you can lock in colors you like to find new ones that work with colors you’ve already picked out.