/// <summary> /// Creates a new instance of a HSx Color /// </summary> /// <param name="Space">The colorspace this color is in</param> /// <param name="H">Hue (0 - 255)</param> /// <param name="S">Saturation (0 - 255)</param> public BColorHSx(RGBSpaceName Space, byte H, byte S) : base() { this.Space = RGBColorspace.GetColorspace(Space); wp = this.Space.ReferenceWhite.Name; this.H = H; this.S = S; }
/// <summary> /// Creates a new instance of a HSx Color /// </summary> /// <param name="Space">The colorspace this color is in</param> /// <param name="H">Hue (0.0 - 360.0)</param> /// <param name="S">Saturation (0.0 - 1.0)</param> public ColorHSx(RGBSpaceName Space, double H, double S) : base() { this.Space = RGBColorspace.GetColorspace(Space); wp = this.Space.ReferenceWhite; this.H = H; this.S = S; }
/// <summary> /// Creates a new instance of a HSx Color /// </summary> /// <param name="Space">The colorspace this color is in</param> /// <param name="H">Hue (0.0 - 360.0)</param> /// <param name="S">Saturation (0 - 65535)</param> public UColorHSx(RGBSpaceName Space, ushort H, ushort S) : base() { this.Space = RGBColorspace.GetColorspace(Space); wp = this.Space.ReferenceWhite.Name; this.H = H; this.S = S; }
/// <summary> /// Creates a new instance of a YCbCr Color /// </summary> /// <param name="Y">Luma-value (0 to 255)</param> /// <param name="Cb">Blue-Yellow Chrominance-value (0 to 255)</param> /// <param name="Cr">Red-Green Chrominance-value (0 to 255)</param> /// <param name="Space">The colorspace this color is in</param> /// <param name="BaseSpace">The colorspace this color is based on</param> public BColorYCbCr(YCbCrSpaceName Space, RGBSpaceName BaseSpace, byte Y, byte Cb, byte Cr) : base() { this.Y = Y; this.Cb = Cb; this.Cr = Cr; this.Space = YCbCrColorspace.GetColorspace(Space); this.BaseSpace = RGBColorspace.GetColorspace(BaseSpace); wp = this.Space.ReferenceWhite.Name; }
/// <summary> /// Creates a new instance of a RGB Color /// </summary> /// <param name="Space">The colorspace this color is in</param> /// <param name="R">The red value (0 - 255)</param> /// <param name="G">The green value (0 - 255)</param> /// <param name="B">The blue value (0 - 255)</param> /// <param name="IsLinear">States if the given values are linear or not</param> public BColorRGB(RGBSpaceName Space, byte R, byte G, byte B, bool IsLinear) : base() { this.Space = RGBColorspace.GetColorspace(Space); wp = this.Space.ReferenceWhite.Name; this.R = R; this.G = G; this.B = B; this.IsLinear = IsLinear; }
/// <summary> /// Creates a new instance of a RGB Color /// </summary> /// <param name="Space">The colorspace this color is in</param> /// <param name="R">The red value (0 - 65535)</param> /// <param name="G">The green value (0 - 65535)</param> /// <param name="B">The blue value (0 - 65535)</param> /// <param name="IsLinear">States if the given values are linear or not</param> public UColorRGB(RGBSpaceName Space, ushort R, ushort G, ushort B, bool IsLinear) : base() { this.Space = RGBColorspace.GetColorspace(Space); wp = this.Space.ReferenceWhite.Name; this.R = R; this.G = G; this.B = B; this.IsLinear = IsLinear; }
private void ColorspaceToDroDo_SelectedIndexChanged(object sender, EventArgs e) { if (IsInit) { if (ColorspaceToDroDo.SelectedIndex == (int)RGBSpaceName.ICC) { if ((ColorModel)ColorToDroDo.SelectedIndex == ColorModel.YCbCr) { ColorspaceToDroDo.SelectedIndex = PrevToSpace; } else { LoadICC(false, true); } } else { RefWhiteToDroDo.SelectedIndex = (int)RGBColorspace.GetColorspace((RGBSpaceName)ColorspaceToDroDo.SelectedIndex).ReferenceWhite.Name; } PrevToSpace = ColorspaceToDroDo.SelectedIndex; } }