[Solved] How to know what r,g,b values to use for get other colours to paint a JFrame dynamically?
Your current approach is indeed not easily generalizable. The hard-coded parts of the buttons for “blue” and “green”, and especially the special methods like blueToGreen make it impossible to extend the number of colors with reasonable effort. (You don’t want to create methods blueToYellow, blueToRed, blueToTheThirdColorFromThisListForWhichIDontKnowAName …). There are many possible ways of generalizing this. … Read more