public HSV(Color color)
{
int max = Math.Max(color.R, Math.Max(color.G, color.B));
int min = Math.Min(color.R, Math.Min(color.G, color.B));
this.Hue = color.GetHue();
this.Saturation = (max == 0) ? 0 : 1d - (1d * min / max);
this.Value = max / 255d;
}