The first gemstone you cast from determines the element of the spell. This is shown in the color of the magic circle that forms. For example, if you start off with Red, you'll get a Fire spell with a Red magic circle around your feet. Don't forget to reorder your gemstones if you end up with the wrong element to start.
Further gemstones will augment them in specific ways, but the order does not matter past the first gemstone. Red-Red-Yellow is the same spell as Red-Yellow-Red. Order is instead just for planning out your spells that will come afterwards.
The quantity of gemstones affect how much of an augment they provide, unless they are of the same color as the spell you are casting. If the element matches, it instead changes what spell you will be casting. As a consequence, you cannot provide an augment from a gemstone to the elemental spells that correspond to it (no attack boost on Fire spells, etc.). The below are the augments with respect to the attack spells - Heal and Super Armor have unique effects since they cannot split or add status ailments.
- Red gemstones increase attack power. The more red, the more power.
- Blue gemstones add status ailments, either poison or paralysis. This is dependent on the specific spell, with additional blue either adding the other ailment or strengthening the poison/paralysis effect.
- Green gemstones increase the number of spells fired. Additional green means more shots fired.
- Yellow gemstones increase the "duration" of the spell. For spells like Air Tornado, this makes it last longer. For projectile spells like Fireball, it increases the number of times it can hit, by giving it a piercing effect. More yellow means a longer duration boost.
If you supply multiple colors, then you will add each of those augments at the same time. For example, Blue-Red-Green-Yellow would shoot three Aqua Jets with increased damage that each hit twice (and, as far as spells using all 4, it's one of the more useful). As noted, the order still doesn't matter past the first gem.