static float distance(final @NotNull HSVLike self, final @NotNull HSVLike other) {
    // weight hue more heavily than saturation and brightness. kind of magic numbers, but is fine for our use case of downsampling to a set of colors
    final float hueDistance = 3 * Math.min(Math.abs(self.h() - other.h()), 1f - Math.abs(self.h() - other.h()));
    final float saturationDiff = self.s() - other.s();
    final float valueDiff = self.v() - other.v();
    return hueDistance * hueDistance + saturationDiff * saturationDiff + valueDiff * valueDiff;
  }
Returns a distance metric to the other colour.

<p>This value is unitless and should only be used to compare with other text colours.</p>

@param self the base colour
@param other colour to compare to
@return distance metric
api/src/main/java/net/kyori/adventure/text/format/TextColorImpl.java