AdjustableColor Class
Definition
Section titled “Definition”A color that can be adjusted by brightness and mapped to a Colors color.
[DataContract]public class AdjustableColorInheritance object
Constructors
Section titled “Constructors”AdjustableColor(Color, string)
Section titled “AdjustableColor(Color, string)”Creates a color that isn’t mapped to a Colors color.
public AdjustableColor(Color color, string name)Parameters
Section titled “Parameters”color SadRogue.Primitives.Color
The color.
name string
A friendly name of the color.
AdjustableColor(Color, string, Colors)
Section titled “AdjustableColor(Color, string, Colors)”Creates a color and tries to map it to a Colors color.
public AdjustableColor(Color color, string name, Colors colors)Parameters
Section titled “Parameters”color SadRogue.Primitives.Color
The color.
name string
A friendly name of the color.
colors Colors
The colors to try and map to.
AdjustableColor(ColorNames, string, Colors)
Section titled “AdjustableColor(ColorNames, string, Colors)”Creates a color that maps to a Colors color.
public AdjustableColor(Colors.ColorNames color, string name, Colors colors)Parameters
Section titled “Parameters”color Colors.ColorNames
The predefined color.
name string
A friendly name of the color.
colors Colors
The colors used setting the BaseColor value.
Properties
Section titled “Properties”The name of the color.
[DataMember]public string? Name { get; set; }BaseColor
Section titled “BaseColor”The color without brightness.
[DataMember]public Color BaseColor { get; }ComputedColor
Section titled “ComputedColor”The color with brightness applied.
public Color ComputedColor { get; }IsCustomColor
Section titled “IsCustomColor”true when this color is not defined by a Colors object; otherwise false.
[DataMember]public bool IsCustomColor { get; set; }UIColor
Section titled “UIColor”The Colors mapped color when IsCustomColor is false.
[DataMember]public Colors.ColorNames UIColor { get; }Brightness
Section titled “Brightness”A brightness to apply to the color.
[DataMember]public Colors.Brightness Brightness { get; set; }Methods
Section titled “Methods”SetUIColor(ColorNames, Colors, Brightness)
Section titled “SetUIColor(ColorNames, Colors, Brightness)”Maps this adjustable color to a Colors color.
public void SetUIColor(Colors.ColorNames color, Colors colors, Colors.Brightness brightness)Parameters
Section titled “Parameters”color Colors.ColorNames
The predefined color.
colors Colors
The colors used setting the BaseColor value.
brightness Colors.Brightness
The brightness to apply to the color.
SetColor(Color, Colors, Brightness)
Section titled “SetColor(Color, Colors, Brightness)”Tries to map this adjustable color to a Colors color.
public void SetColor(Color color, Colors colors, Colors.Brightness brightness)Parameters
Section titled “Parameters”color SadRogue.Primitives.Color
The color.
colors Colors
The colors to try and map to.
brightness Colors.Brightness
The brightness to apply to the color.
SetColor(Color)
Section titled “SetColor(Color)”Configures this adjustable color to the specified color.
public void SetColor(Color color)Parameters
Section titled “Parameters”color SadRogue.Primitives.Color
The color.
RefreshUIColor(Colors)
Section titled “RefreshUIColor(Colors)”Refreshes BaseColor using UIColor and the provided Colors object.
public void RefreshUIColor(Colors colors)Parameters
Section titled “Parameters”colors Colors
The colors to pull a color value from.
Clone()
Section titled “Clone()”Creates a copy of this object.
public AdjustableColor Clone()Returns
Section titled “Returns”AdjustableColor
A new adjustable color object.