Regarding your color function; this looks like the NeoPixel color Wheel routine. Why not use FastLED’s CHSV, which is much simpler? I suggest that you spend time looking at (and modifying) existing FastLED demos that make use of functionality not available in the NeoPixel library.
Furthermore, FastLED includes a rainbow function, which makes life even easier. Have a look around and see what you can find.
As for teaching, just search for some FastLED examples online and play around with them. There’s a LOT out there. In the meantime, if you get through these, you’ll be well on your way: