Accordion quesiton

Accordion quesiton

I was wondering if it's possible to have an accordion with say 5 different main menu links all with five different colors and have the corresponding sub menu items of those 5 be the same color as the main menu. all while keeping the hex value on while you're in that section.