Elliott, thank you very much for your reply.
I tried using your code in different code block elements like you suggested but did not work. However I took pieces of your code and used it in the quick css:
The submenu heigh was pretty straightforward in quick css, and for the custom submenu color bars first I defined a Custom Css Class for each fullwidth submenu and then changed the color of each custom class using your code in the quick css.
Thanks again for your prompt response and suggested solution!