public static Color3[] ToColor3Array(int[] colors, IColor3Transform transform, int count) { int l = (count <= 0) ? Int32.MaxValue : count; if (l > colors.Length) { l = colors.Length; } Color3[] a = new Color3[l]; for (int i = 0; i < l; i++) { int c = colors[i]; a[i] = transform.ToColor3(Color.FromArgb((c >> 16) & 0xff, (c >> 8) & 0xff, c & 0xff)); } return(a); }
public Color FromColor3(Color3 color) { return(ColorTransform.LabToRgb(new LabColor(color.A, color.B, color.C))); }