Table of Contents

Class ColorRGB

Namespace
ImageMagick
Assembly
Magick.NET-Q16-AnyCPU.dll

Class that represents a RGB color.

public sealed class ColorRGB : ColorBase, IEquatable<ColorBase?>, IComparable<ColorBase?>
Inheritance
ColorRGB
Implements
Inherited Members

Constructors

ColorRGB(IMagickColor<ushort>)

Initializes a new instance of the ColorRGB class.

public ColorRGB(IMagickColor<ushort> value)

Parameters

value IMagickColor<ushort>

The color to use.

ColorRGB(ushort, ushort, ushort)

Initializes a new instance of the ColorRGB class.

public ColorRGB(ushort red, ushort green, ushort blue)

Parameters

red ushort

Red component value of this color.

green ushort

Green component value of this color.

blue ushort

Blue component value of this color.

Properties

B

Gets or sets the blue component value of this color.

public ushort B { get; set; }

Property Value

ushort

G

Gets or sets the green component value of this color.

public ushort G { get; set; }

Property Value

ushort

R

Gets or sets the red component value of this color.

public ushort R { get; set; }

Property Value

ushort

Methods

ComplementaryColor()

Returns the complementary color for this color.

public ColorRGB? ComplementaryColor()

Returns

ColorRGB

A ColorRGB instance.

FromMagickColor(IMagickColor<ushort>)

Converts the specified ImageMagick.IMagickColor<> to an instance of this type.

public static ColorRGB? FromMagickColor(IMagickColor<ushort> color)

Parameters

color IMagickColor<ushort>

The color to use.

Returns

ColorRGB

A ColorRGB instance.

Operators

explicit operator ColorRGB?(MagickColor)

Converts the specified MagickColor to an instance of this type.

public static explicit operator ColorRGB?(MagickColor color)

Parameters

color MagickColor

The color to use.

Returns

ColorRGB

A ColorRGB instance.