C# Class Faker.Color

A collection of Color related resources.
Exibir arquivo Open project: AdmiringWorm/Faker.NET.Portable

Public Methods

Method Description
AlphaChannel ( ) : double

Generates a random alpha value. (Random double between 0 and 1).

HSL ( ) : double[]

Generates an array of HSL values.

The generated double is an array of fixed length of 3.

HSLA ( ) : double[]

Generates an array of HSL values with alpha channel.

The generated double is an array of fixed length of 4.

The first 3 items is the HSL values.

The last item is the alpha channel.

HexColor ( ) : string

Generates Hex Color

RGB ( ) : byte[]

Generates a byte array of RGB values.

The generated byte array is an array of a fixed length of 3.

SingleHSL ( ) : double

Generates a single hsl value. (Random double between 0 and 360.

SingleRGB ( ) : byte

Generates a single rgb value.

Method Details

AlphaChannel() public static method

Generates a random alpha value. (Random double between 0 and 1).
public static AlphaChannel ( ) : double
return double

HSL() public static method

Generates an array of HSL values.
The generated double is an array of fixed length of 3.
public static HSL ( ) : double[]
return double[]

HSLA() public static method

Generates an array of HSL values with alpha channel.

The generated double is an array of fixed length of 4.

The first 3 items is the HSL values.

The last item is the alpha channel.

public static HSLA ( ) : double[]
return double[]

HexColor() public static method

Generates Hex Color
public static HexColor ( ) : string
return string

RGB() public static method

Generates a byte array of RGB values.
The generated byte array is an array of a fixed length of 3.
public static RGB ( ) : byte[]
return byte[]

SingleHSL() public static method

Generates a single hsl value. (Random double between 0 and 360.
public static SingleHSL ( ) : double
return double

SingleRGB() public static method

Generates a single rgb value.
public static SingleRGB ( ) : byte
return byte