Ability to sort palette by hue and luminance


Is it possible add the ability to sort palette colours by more than one variable?

For example, I want to be able to see all the reds lined up from brightest to darkest. But if I choose luminance or brightness, all the colours get mixed up.