Zend certified PHP/Magento developer

How to create custom filter

I have a doubt, in my filters I need that, when clicking on a color, for example BLUE, it opens the variations of BLUE below (Navy Blue, Dark Blue..) I thought about making 2 attributes, one as master color, and another as a secondary color, however, I can’t figure out how to display this. So that when you click on the color, it displays the secondary colors below. How can I do this? Is there a search engine that can help me, or something similar?