Class ColorPair
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
backgroundstringThe background color as a six-digit hexadecimal value.
foregroundstringThe 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
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
Exceptions
- ArgumentException
Thrown when the value is not a valid hexadecimal color code.