Create a color fence. You can create a polygonal fence that describes your preferred color set and calculate an intersection from the hue value in HSV. If my hue is 320, then I could find a nice shade of orange/red along the polygonal fence. This should give you controlled useable colors. The intersection length is the value, and you could store variable saturation on the fence points if you want to control the level of saturation.
Good to see that the OP is getting acquainted with color theory.
Just one thing:
Is this color scheme used elsewhere in the game?
This might be OK for a menu, but it's almost impossible to extract any encoded information out of it,
if you have any mild form of color blindness. The difference between factory/jungle just doesn't work out in any version.
Having different lightness values actually helps as a factor to maximize uniqueness of each distinct color in the set.
I also found the difference between "Factory" and "Jungle" colors to be very difficult to discern in the example images.
Any design, be it for software, physical interfaces, traffic lights, or anything else that relies on colors for conveying information should also provide alternate means of encoding the same information. You can use shape, texture, lightness/saturation, order, or a number of other properties. The 4-5% of the population who are colorblind or have color vision deficiency will thank you.
I hear you guys. In that case it is not a problem, since the color does not convey any information. In the game the difference in lightness of the elements should be enough so that colorblind people can still play without any trouble.
That's pretty cool. Ages ago I made a procedural platformer that colorized random tilesets in a similar way (I don't have any screenshots handy, sorry) and it worked out really well. I used the same random colorscheme code for a procedural landscape generator:
Does anyone know how to get an X amount of colors that visually are as much different from each other as possible? While setting boundary conditions such as allowed lightness values.
http://www.boronine.com/husl/