Struct NdpColor
The NDepend API uses this type to return some color value. Such a value can be easily converted to any UI framework color value.
public readonly struct NdpColor
- Inherited Members
- Extension Methods
Remarks
Since the NDepend API doesn't reference any UI framework it cannot return some System.Drawing.Color values for example.
Constructors (2)
NdpColor(byte, byte, byte)
Create a new Color value.
public NdpColor(byte red, byte green, byte blue)
Parameters
NdpColor(byte, byte, byte, byte)
Create a new Color value.
public NdpColor(byte alpha, byte red, byte green, byte blue)
Parameters
Fields (8)
Black
Black color constant.
public static readonly NdpColor Black
Field Value
Blue
Blue color constant.
public static readonly NdpColor Blue
Field Value
Gray
Gray color constant.
public static readonly NdpColor Gray
Field Value
Green
Green color constant.
public static readonly NdpColor Green
Field Value
Orange
Orange color constant.
public static readonly NdpColor Orange
Field Value
Red
Red color constant.
public static readonly NdpColor Red
Field Value
Transparent
Transparent color constant.
public static readonly NdpColor Transparent
Field Value
White
White color constant.
public static readonly NdpColor White
Field Value
Properties (4)
A
The Alpha channel value of the color.
public byte A { get; }
Property Value
B
The Blue channel value of the color.
public byte B { get; }
Property Value
G
The Green channel value of the color.
public byte G { get; }
Property Value
R
The Red channel value of the color.
public byte R { get; }
Property Value
Methods (5)
ColorEquals(NdpColor)
Returns true if this and other color Alpha Red Green Blue values are equals.
public bool ColorEquals(NdpColor other)
Parameters
otherNdpColor
Returns
FromArgb(byte, byte, byte)
Create a new Color value with Alpha channel set to 255.
public static NdpColor FromArgb(byte red, byte green, byte blue)
Parameters
redbyteThe Red channel value of the color.
greenbyteThe Green channel value of the color.
bluebyteThe Blue channel value of the color.
Returns
FromArgb(byte, byte, byte, byte)
Create a new Color value.
public static NdpColor FromArgb(byte alpha, byte red, byte green, byte blue)
Parameters
alphabyteThe Alpha channel value of the color.
redbyteThe Red channel value of the color.
greenbyteThe Green channel value of the color.
bluebyteThe Blue channel value of the color.
Returns
FromHexInit(int)
Create a new Color value with Alpha channel from a 32-bits ARGB value.
public static NdpColor FromHexInit(int value)
Parameters
valueintThe 32-bits ARGB value.
Returns
ToHexInt()
Gets the 32-bit ARGB value of this NdpColor structure.
public int ToHexInt()