|
@@ -15,7 +15,6 @@ namespace Terminal.Gui {
|
|
/// <remarks>
|
|
/// <remarks>
|
|
/// The <see cref="Attribute.HasValidColors"/> value indicates either no-color has been set or the color is invalid.
|
|
/// The <see cref="Attribute.HasValidColors"/> value indicates either no-color has been set or the color is invalid.
|
|
/// </remarks>
|
|
/// </remarks>
|
|
- [JsonConverter (typeof (ColorJsonConverter))]
|
|
|
|
public enum ColorNames {
|
|
public enum ColorNames {
|
|
/// <summary>
|
|
/// <summary>
|
|
/// The black color.
|
|
/// The black color.
|
|
@@ -83,6 +82,7 @@ namespace Terminal.Gui {
|
|
White
|
|
White
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ [JsonConverter (typeof (ColorJsonConverter))]
|
|
public class Color {
|
|
public class Color {
|
|
public Color (ColorNames colorName)
|
|
public Color (ColorNames colorName)
|
|
{
|
|
{
|
|
@@ -474,8 +474,8 @@ namespace Terminal.Gui {
|
|
{
|
|
{
|
|
Foreground = foreground;
|
|
Foreground = foreground;
|
|
Background = background;
|
|
Background = background;
|
|
- //TrueColorForeground = TrueColor.FromColorName (foreground);
|
|
|
|
- //TrueColorBackground = TrueColor.FromColorName (background);
|
|
|
|
|
|
+ TrueColorForeground = TrueColor.FromColorName ((ColorNames)foreground.Value);
|
|
|
|
+ TrueColorBackground = TrueColor.FromColorName ((ColorNames)background.Value);
|
|
Value = value;
|
|
Value = value;
|
|
Initialized = true;
|
|
Initialized = true;
|
|
}
|
|
}
|
|
@@ -489,8 +489,8 @@ namespace Terminal.Gui {
|
|
{
|
|
{
|
|
Foreground = foreground;
|
|
Foreground = foreground;
|
|
Background = background;
|
|
Background = background;
|
|
- //TrueColorForeground = TrueColor.FromColorName (foreground);
|
|
|
|
- //TrueColorBackground = TrueColor.FromColorName (background);
|
|
|
|
|
|
+ TrueColorForeground = TrueColor.FromColorName ((ColorNames)foreground.Value);
|
|
|
|
+ TrueColorBackground = TrueColor.FromColorName ((ColorNames)background.Value);
|
|
|
|
|
|
var make = Make (foreground, background);
|
|
var make = Make (foreground, background);
|
|
Initialized = make.Initialized;
|
|
Initialized = make.Initialized;
|