Class ColorantRgb

Class ColorantRgb

Namespace: Aspose.Imaging.Xmp.Types.Complex.Colorant
Assembly: Aspose.Imaging.dll (25.7.0)

Represents RGB Colorant.

[JsonObject(MemberSerialization.OptIn)]
   public sealed class ColorantRgb : ColorantBase, IXmpType, ICloneable
   {
      public override string XMPTypeId => "RGBColor";
      private double _red;
      private double _green;
      private double _blue;
      public ColorantRgb(double red, double green, double blue)
      {
         _red = red;
         _green = green;
         _blue = blue;
      }
      public double Red
      {
         get => _red;
         set => _red = value;
      }
      public double Green
      {
         get => _green;
         set => _green = value;
      }
      public double Blue
      {
         get => _blue;
         set => _blue = value;
      }
   }

Inheritance

object XmpTypeBase ComplexTypeBase ColorantBase ColorantRgb

Implements

IXmpType , ICloneable

Inherited Members

ColorantBase.GetXmpRepresentation() , ColorantBase.Mode , ColorantBase.SwatchName , ColorantBase.ColorType , ComplexTypeBase.GetXmpRepresentation() , ComplexTypeBase.Prefix , ComplexTypeBase.NamespaceUri , XmpTypeBase.GetXmpRepresentation() , XmpTypeBase.ToString() , XmpTypeBase.Clone() , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

ColorantRgb()

Initializes a new instance of the Aspose.Imaging.Xmp.Types.Complex.Colorant.ColorantRgb class.

[JsonConstructor]
   public ColorantRgb()
   {
   }

ColorantRgb(byte, byte, byte)

Initializes a new instance of the Aspose.Imaging.Xmp.Types.Complex.Colorant.ColorantRgb class.

public ColorantRgb(byte red, byte green, byte blue)
   {
   }

Parameters

red byte

The red component value.

green byte

The green component value.

blue byte

The blue component value.

Properties

Blue

Gets or sets the blue component value.

[JsonProperty]
public byte Blue
{
    get;
    set;
}

Property Value

byte

Green

Gets or sets the green component value.

[JsonProperty]
    public byte Green
    {
        get;
        set;
    }

Property Value

byte

Red

Gets or sets the red component value.

[JsonProperty]
    public byte Red
    {
        get;
        set;
    }

Property Value

byte

Methods

GetXmpRepresentation()

Gets the string contained value in XMP format.

public override string GetXmpRepresentation()
{
}
In this case, since there is only one line of code, the reformatted version remains the same as the provided code. However, if there were multiple lines in the function body, they would be properly indented and spaced according to C# conventions.

Returns

string

Returns the string contained value in XMP format.

 English