I don't fully understand what you're trying to do but using Sets could be the solution to your problem. Check this blog post on sets and sorting in Tableau which I believe covers a similar issue to what I'm interpreting (perhaps incorrectly) is the same issue you're facing.
The solution in the blog has both category and sub-category in the Rows shelf and hence it is easier to bring the "category + sub category" set in the view for sorting. In Andres's case just the Category is in the rows shelf and Sub Category is in the colors shelf.
Sorry, but I dont have a solution for this either within Tableau. My quick fix would be to go back and create a Rank field in the data based on the required sorting and use that as color in the view.
Thanks Andrew! It worked fine! I followed-up th steps and really worked as expected!
Have a great day and thansk again!
Actually Andrew's link solved the issue perfectly well.
Thanks and best regards,
I figured it out too