This confuses me for a moment, but then I realize, the gem is feeding the enchantment with magic it's gathered from the environment around it, this means that the pen is using a random assortment of magic affinity types to draw this give it the odd effects.