forked from technogeeky/KSPPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Palette.cs
75 lines (61 loc) · 1.59 KB
/
Palette.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace KSPPP
{
[Serializable]
public class Palette
{
public string name;
public Kind kind;
public Swatches Swatches { get; private set; }
public Color32[] colors;
public List<Color> colors4;
//public List<uint32> _hexCodes = new List<uint32>();
public enum Kind {
Diverging,
Qualitative,
Sequential,
Invertable,
Unknown,
}
public enum Is : ushort { Unsafe = 0, Safe = 1, Unsure = 2, Unknown = 3 }
public Is blind;
public Is print;
public Is xerox;
public Is panel;
//public List<Color> colors;
//public List<uint32> _hexCodes = new List<uint32>();
public Palette () {
this.kind = Kind.Unknown;
this.blind = Is.Unknown;
this.print = Is.Unknown;
this.xerox = Is.Unknown;
this.panel = Is.Unknown;
}
public Palette(string name) : this(name,null) {}
public Palette(string name, IEnumerable<Swatch> cs) {
this.name = name;
this.Swatches = new Swatches();
if (colors != null) this.Swatches.AddRange(cs);
}
public Palette(Color32[] cs, Kind k, Is blindSafe, Is printSafe, Is xeroxSafe, Is panelSafe) {
this.colors = cs;
this.kind = k;
this.blind = blindSafe;
this.print = printSafe;
this.xerox = xeroxSafe;
this.panel = panelSafe;
}
public Palette(Color32[] cs, string name, Kind k, Is blindSafe, Is printSafe, Is xeroxSafe, Is panelSafe) {
this.colors = cs;
this.name = name;
this.kind = k;
this.blind = blindSafe;
this.print = printSafe;
this.xerox = xeroxSafe;
this.panel = panelSafe;
}
}
}