public static Color ToColor(this ModelColor cl) { unchecked { return(Color.FromArgb((int)cl.Argb)); } }
ModelColor AdjustColor(ModelColor color) { switch (paletteBrightness) { case PaletteBrightness.Increased: return(color.MakeLighter(22)); case PaletteBrightness.Decreased: return(color.MakeDarker(16)); default: return(color); } }
public int?FindColor(ModelColor color) { int ret = 0; foreach (int cl in colors) { if (color.Argb == FromRGB(cl).Argb) { return(ret); } ret++; } return(null); }
public ColorTableEntry(int id, ModelColor cl) { ID = id; Color = cl; }
public static string ToHtmlColor(this ModelColor cl) { return(string.Format("#{0:x6}", cl.Argb & 0xffffff)); }