Table of Contents

Class ColorPair

Namespace
C4.Net
Assembly
C4.Net.Core.dll

Represents a validated background and foreground color combination.

[DataContract]
public sealed class ColorPair
Inheritance
ColorPair
Inherited Members

Constructors

ColorPair(string, string)

Creates a color pair from the supplied hexadecimal color codes.

public ColorPair(string background, string foreground)

Parameters

background string

The background color as a six-digit hexadecimal value.

foreground string

The foreground color as a six-digit hexadecimal value.

Properties

Background

Defines the background color as a normalized lowercase hexadecimal value.

[DataMember(Name = "background", EmitDefaultValue = false)]
public string Background { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when the value is not a valid hexadecimal color code.

Foreground

Defines the foreground color as a normalized lowercase hexadecimal value.

[DataMember(Name = "foreground", EmitDefaultValue = false)]
public string Foreground { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when the value is not a valid hexadecimal color code.