public static ColorItem FromColor(Color color, ColorItemType itemType) { ColorItem returnValue = color; returnValue.ItemType = itemType; return(returnValue); }
private ColorEntry.ColorItemEntry Parse(ColorItemType type, JObject jobject) { ColorEntry.ColorItemEntry item = new ColorEntry.ColorItemEntry(); item.Type = type; item.Hue = (int)jobject["hue"]; item.Saturation = (double)jobject["saturation"]; item.Lightness = (double)jobject["lightness"]; item.Contrast = (double)jobject["contrast"]; item.Brightness = (int)jobject["brightness"]; item.RGB = Color.FromArgb((int)jobject["rgb"][0], (int)jobject["rgb"][1], (int)jobject["rgb"][2]); return(item); }