Color choice is highly subjective. There's no such thing as "proper colours". Everyone has different ideas on which colours they like, or which they feel are suitable.
There are ways to automate choice of colours from an image, for example Adobe Color has an Extract Theme function which will allow you to upload an image, and the software will automatically create a palette based on the image.
If you don't like the automatic choice, it's possible to move the samples around until you get a result you like, or choose from the options availabe, colorful, bright, muted, etc.
Note: I'm not promoting the Adobe Color service here, just using it as an example. There are many similar services across the web. Many are listed here. Also you can get a free Adobe account to access this service.
Once you've chosen your colours and applied it to your website you might then want to check it at the WCAG checker to make sure it meets the web accessibility guidelines. Or if you prefer, the guidelines are also published here on the W3C site. This is the closest thing you will get to any criteria.
It's also possible to use the Accessibility Tools within Adobe Color to check your palette, although I've no idea how closely they comply with WCAG.