How to optimize HSB color comparisons?

oh and here’s some examples. with RGB:

with HSB: