Table of Contents

Struct NdpColor

Namespace
NDepend.Helpers
Assembly
NDepend.API.dll

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

red byte
green byte
blue byte

NdpColor(byte, byte, byte, byte)

Create a new Color value.

public NdpColor(byte alpha, byte red, byte green, byte blue)

Parameters

alpha byte
red byte
green byte
blue byte

Fields (8)

Black

Black color constant.

public static readonly NdpColor Black

Field Value

NdpColor

Blue

Blue color constant.

public static readonly NdpColor Blue

Field Value

NdpColor

Gray

Gray color constant.

public static readonly NdpColor Gray

Field Value

NdpColor

Green

Green color constant.

public static readonly NdpColor Green

Field Value

NdpColor

Orange

Orange color constant.

public static readonly NdpColor Orange

Field Value

NdpColor

Red

Red color constant.

public static readonly NdpColor Red

Field Value

NdpColor

Transparent

Transparent color constant.

public static readonly NdpColor Transparent

Field Value

NdpColor

White

White color constant.

public static readonly NdpColor White

Field Value

NdpColor

Properties (4)

A

The Alpha channel value of the color.

public byte A { get; }

Property Value

byte

B

The Blue channel value of the color.

public byte B { get; }

Property Value

byte

G

The Green channel value of the color.

public byte G { get; }

Property Value

byte

R

The Red channel value of the color.

public byte R { get; }

Property Value

byte

Methods (5)

ColorEquals(NdpColor)

Returns true if this and other color Alpha Red Green Blue values are equals.

public bool ColorEquals(NdpColor other)

Parameters

other NdpColor

Returns

bool

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

red byte

The Red channel value of the color.

green byte

The Green channel value of the color.

blue byte

The Blue channel value of the color.

Returns

NdpColor

FromArgb(byte, byte, byte, byte)

Create a new Color value.

public static NdpColor FromArgb(byte alpha, byte red, byte green, byte blue)

Parameters

alpha byte

The Alpha channel value of the color.

red byte

The Red channel value of the color.

green byte

The Green channel value of the color.

blue byte

The Blue channel value of the color.

Returns

NdpColor

FromHexInit(int)

Create a new Color value with Alpha channel from a 32-bits ARGB value.

public static NdpColor FromHexInit(int value)

Parameters

value int

The 32-bits ARGB value.

Returns

NdpColor

ToHexInt()

Gets the 32-bit ARGB value of this NdpColor structure.

public int ToHexInt()

Returns

int

The 32-bit ARGB value of this NdpColor.