public static float HueDistance(this VRageMath.Color color, VRageMath.Color otherColor) => color.HueDistance(otherColor.ColorToHSV().X);
public static float HueDistance(this VRageMath.Color color, float hue) { float num2 = Math.Abs((float)(color.ColorToHSV().X - hue)); return(Math.Min(num2, 1f - num2)); }