Save as "changeColors.jsx" in your local Illustrator's Scripts folder so it will appear in the File > Scripts menu next time you restart Illustrator, or anywhere else (and you'll have to browse for its location).

You can change the min/max adjustment values at will; for example, setting these values to 0 for both red and blue will only change the Green component.