-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCachedColor.cs
44 lines (38 loc) · 1.05 KB
/
CachedColor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System.Diagnostics;
using System.Windows.Media;
using System.Windows.Media.Imaging;
/// <remarks>
/// See Program.cs for license.
/// </remarks>
namespace TerrariaPixelArtHelper
{
/// <summary>
/// Cache of wall+color for the <see cref="FindClosestColor" /> window.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class CachedColor
{
/// <summary>
/// The name of the color.
/// </summary>
public string ColorName { get; set; }
/// <summary>
/// The L*a*b* representation of the wall color.
/// </summary>
public LAB LABColor { get; set; }
/// <summary>
/// The color of the wall.
/// </summary>
public Color WallColor { get; set; }
/// <summary>
/// The colored bitmap of the wall.
/// </summary>
public BitmapSource WallImage { get; set; }
/// <summary>
/// The name of this wall.
/// </summary>
public string WallName { get; set; }
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
string DebuggerDisplay => $"{{{this.WallName}, {this.ColorName}, {this.WallColor}, {this.LABColor}}}";
}
}