/// <summary> /// Returns the ARKColor that is closest to the given argb (sRGB) values. /// </summary> /// <param name="r"></param> /// <param name="g"></param> /// <param name="b"></param> /// <param name="a"></param> /// <returns></returns> public ARKColor ClosestColor(double r, double g, double b, double a) { int hash = ARKColor.ColorHashCode(r, g, b, a); ARKColor ac = ByHash(hash); if (ac.id != 0) { return(ac); } return(ClosestColorFromRGB(r, g, b, a)); }
public ARKColor ClosestColor(double r, double g, double b) { int hash = ARKColor.ColorHashCode(r, g, b); ARKColor ac = ByHash(hash); if (ac.name != "unknown") { return(ac); } return(ClosestColorFromRGB(r, g, b)); }