From 00b22a5e7af03f9ae0c159e476b9ed3c2d41595b Mon Sep 17 00:00:00 2001 From: DMagic Date: Tue, 22 Aug 2017 13:42:56 -0400 Subject: [PATCH 01/29] Version --- SCANassets/SCANsat.version | 2 +- SCANmechjeb/Properties/AssemblyInfo.cs | 6 +++--- SCANsat.Unity/Properties/AssemblyInfo.cs | 4 ++-- SCANsat/Properties/AssemblyInfo.cs | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SCANassets/SCANsat.version b/SCANassets/SCANsat.version index 1c1328f8d..e9bc367de 100644 --- a/SCANassets/SCANsat.version +++ b/SCANassets/SCANsat.version @@ -11,7 +11,7 @@ "MAJOR":1, "MINOR":1, "PATCH":8, - "BUILD":0 + "BUILD":1 }, "KSP_VERSION":{ "MAJOR":1, diff --git a/SCANmechjeb/Properties/AssemblyInfo.cs b/SCANmechjeb/Properties/AssemblyInfo.cs index 6bc449e68..f7744bc5d 100644 --- a/SCANmechjeb/Properties/AssemblyInfo.cs +++ b/SCANmechjeb/Properties/AssemblyInfo.cs @@ -32,9 +32,9 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.8.0.0")] -[assembly: AssemblyFileVersion("1.8.0.0")] -[assembly: AssemblyInformationalVersion ("v18.0")] +[assembly: AssemblyVersion("1.8.1.0")] +[assembly: AssemblyFileVersion("1.8.1.0")] +[assembly: AssemblyInformationalVersion ("v18.1")] [assembly: KSPAssembly ("SCANmechjeb", 0, 5)] [assembly: KSPAssemblyDependency ("SCANsat", 1, 8)] diff --git a/SCANsat.Unity/Properties/AssemblyInfo.cs b/SCANsat.Unity/Properties/AssemblyInfo.cs index 308065b85..9b00e0cda 100644 --- a/SCANsat.Unity/Properties/AssemblyInfo.cs +++ b/SCANsat.Unity/Properties/AssemblyInfo.cs @@ -22,5 +22,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("0c523d04-a52e-48bb-85b6-d75e8b7a63b9")] -[assembly: AssemblyVersion("1.8.0.0")] -[assembly: AssemblyFileVersion("1.8.0.0")] +[assembly: AssemblyVersion("1.8.1.0")] +[assembly: AssemblyFileVersion("1.8.1.0")] diff --git a/SCANsat/Properties/AssemblyInfo.cs b/SCANsat/Properties/AssemblyInfo.cs index 78607bd8c..bea0d13f8 100644 --- a/SCANsat/Properties/AssemblyInfo.cs +++ b/SCANsat/Properties/AssemblyInfo.cs @@ -14,9 +14,9 @@ // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("1.8.0.0")] -[assembly: AssemblyFileVersion ("1.8.0.0")] -[assembly: AssemblyInformationalVersion ("v18.0")] +[assembly: AssemblyVersion ("1.8.1.0")] +[assembly: AssemblyFileVersion ("1.8.1.0")] +[assembly: AssemblyInformationalVersion ("v18.1")] [assembly: KSPAssembly ("SCANsat", 1, 8)] From 5d3cc83e2aeaa37b29ce988679f77218abdd68bc Mon Sep 17 00:00:00 2001 From: DMagic Date: Tue, 22 Aug 2017 13:44:14 -0400 Subject: [PATCH 02/29] Update using references --- SCANmechjeb/SCANmechjeb.cs | 2 +- SCANsat/SCAN_Color_Config.cs | 6 ++---- SCANsat/SCAN_Map/SCANmap.cs | 2 +- SCANsat/SCAN_Settings_Config.cs | 2 +- SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs | 2 +- SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs | 2 +- SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs | 2 +- SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs | 2 +- SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs | 2 +- 9 files changed, 10 insertions(+), 12 deletions(-) diff --git a/SCANmechjeb/SCANmechjeb.cs b/SCANmechjeb/SCANmechjeb.cs index 2ad780d4d..5e8e57acf 100644 --- a/SCANmechjeb/SCANmechjeb.cs +++ b/SCANmechjeb/SCANmechjeb.cs @@ -15,7 +15,7 @@ using SCANsat; using SCANsat.SCAN_Data; using log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; using MuMech; using UnityEngine; diff --git a/SCANsat/SCAN_Color_Config.cs b/SCANsat/SCAN_Color_Config.cs index ee9ec1f26..3f225bbb7 100644 --- a/SCANsat/SCAN_Color_Config.cs +++ b/SCANsat/SCAN_Color_Config.cs @@ -14,11 +14,9 @@ using System.Collections.Generic; using SCANsat.SCAN_Data; using SCANsat.SCAN_Platform; -using SCANsat.SCAN_Platform.Palettes; -using SCANsat.SCAN_Platform.Palettes.ColorBrewer; -using SCANsat.SCAN_Platform.Palettes.FixedColors; +using SCANsat.SCAN_Palettes; using UnityEngine; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat { diff --git a/SCANsat/SCAN_Map/SCANmap.cs b/SCANsat/SCAN_Map/SCANmap.cs index b66f7f1be..5f5bf7b46 100644 --- a/SCANsat/SCAN_Map/SCANmap.cs +++ b/SCANsat/SCAN_Map/SCANmap.cs @@ -19,7 +19,7 @@ using SCANsat.SCAN_Platform.Logging; using SCANsat.SCAN_Data; using SCANsat.SCAN_UI.UI_Framework; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat.SCAN_Map { diff --git a/SCANsat/SCAN_Settings_Config.cs b/SCANsat/SCAN_Settings_Config.cs index d18bb0797..eb31ef571 100644 --- a/SCANsat/SCAN_Settings_Config.cs +++ b/SCANsat/SCAN_Settings_Config.cs @@ -15,7 +15,7 @@ using System.IO; using System.Reflection; using UnityEngine; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat { diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs b/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs index d2e8e9d7b..ae9fff31f 100644 --- a/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs +++ b/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs @@ -15,7 +15,7 @@ using System.Collections.Generic; using SCANsat.SCAN_Unity; using UnityEngine; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat.SCAN_UI.UI_Framework diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs b/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs index 5d2595f11..ab62e2b41 100644 --- a/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs +++ b/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs @@ -23,7 +23,7 @@ using SCANsat.SCAN_Data; using SCANsat.SCAN_Map; using SCANsat.SCAN_Unity; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; using UnityEngine; namespace SCANsat.SCAN_UI.UI_Framework diff --git a/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs index 2f848a524..698e0a37d 100644 --- a/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs +++ b/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs @@ -22,7 +22,7 @@ using SCANsat.SCAN_Data; using SCANsat.SCAN_UI.UI_Framework; using KSP.UI; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat.SCAN_Unity { diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs b/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs index 867660eb4..02e4fcf14 100644 --- a/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs +++ b/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs @@ -25,7 +25,7 @@ using SCANsat.SCAN_Data; using SCANsat.SCAN_UI.UI_Framework; using KSP.UI; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat.SCAN_Unity { diff --git a/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs index e24f9064a..ab64d6a6d 100644 --- a/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs +++ b/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs @@ -27,7 +27,7 @@ using KSP.Localization; using FinePrint; using FinePrint.Utilities; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil; namespace SCANsat.SCAN_Unity { From 390ecf1e8e49b679f5271599039e41c684337dc5 Mon Sep 17 00:00:00 2001 From: DMagic Date: Tue, 22 Aug 2017 13:44:30 -0400 Subject: [PATCH 03/29] Delete or move old color palette classes --- .../Palettes/ColorBrewer/ColorBrewer.cs | 820 ------------------ .../Palettes/ColorBrewer/Include/Original.cs | 731 ---------------- .../FixedColors/FixedColorPalettes.cs | 120 --- SCANsat/SCAN_Platform/Palettes/Palette.cs | 76 -- .../SCAN_Platform/Palettes/PaletteLoader.cs | 95 -- SCANsat/SCAN_Platform/Palettes/Palettes.cs | 79 -- SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs | 352 -------- 7 files changed, 2273 deletions(-) delete mode 100644 SCANsat/SCAN_Platform/Palettes/ColorBrewer/ColorBrewer.cs delete mode 100644 SCANsat/SCAN_Platform/Palettes/ColorBrewer/Include/Original.cs delete mode 100644 SCANsat/SCAN_Platform/Palettes/FixedColors/FixedColorPalettes.cs delete mode 100644 SCANsat/SCAN_Platform/Palettes/Palette.cs delete mode 100644 SCANsat/SCAN_Platform/Palettes/PaletteLoader.cs delete mode 100644 SCANsat/SCAN_Platform/Palettes/Palettes.cs delete mode 100644 SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs diff --git a/SCANsat/SCAN_Platform/Palettes/ColorBrewer/ColorBrewer.cs b/SCANsat/SCAN_Platform/Palettes/ColorBrewer/ColorBrewer.cs deleted file mode 100644 index 981c9fec4..000000000 --- a/SCANsat/SCAN_Platform/Palettes/ColorBrewer/ColorBrewer.cs +++ /dev/null @@ -1,820 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCAN ColorBrewer - static class for generating Color Brewer color palettes - * - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using System; -using UnityEngine; - - -namespace SCANsat.SCAN_Platform.Palettes.ColorBrewer { - public static class BrewerPalettes { - static Func RGB = (r,g,b) => new Color32(r,g,b,255); - - /*** Diverging ***/ - public static Palette Spectral (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(252,141,089), RGB(255,255,191), RGB(153,213,148)}; break; - case 04: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(171,221,164), RGB(043,131,186)}; break; - case 05: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(255,255,191), RGB(171,221,164), RGB(043,131,186)}; break; - case 06: c = new[] {RGB(213,062,079), RGB(252,141,089), RGB(254,224,139), RGB(230,245,152), RGB(153,213,148), RGB(050,136,189)}; break; - case 07: c = new[] {RGB(213,062,079), RGB(252,141,089), RGB(254,224,139), RGB(255,255,191), RGB(230,245,152), RGB(153,213,148), RGB(050,136,189)}; break; - case 08: c = new[] {RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189)}; break; - case 09: c = new[] {RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(255,255,191), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189)}; break; - case 10: c = new[] {RGB(158,001,066), RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189), RGB(094,079,162)}; break; - default: c = new[] {RGB(158,001,066), RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(255,255,191), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189), RGB(094,079,162)}; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {2, 2, 2, 0, 0, 0, 0, 0, 0}; - var @print = new[] {1, 1, 1, 0, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 1, 1, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0, 0, 0}; - - return new Palette(c, "Spectral", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette RdYlGn (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(252,141,089), RGB(255,255,191), RGB(145,207,096)}; break; - case 04: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(166,217,106), RGB(026,150,065)}; break; - case 05: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(255,255,191), RGB(166,217,106), RGB(026,150,065)}; break; - case 06: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,139), RGB(217,239,139), RGB(145,207,096), RGB(026,152,080)}; break; - case 07: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,139), RGB(255,255,191), RGB(217,239,139), RGB(145,207,096), RGB(026,152,080)}; break; - case 08: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(217,239,139), RGB(166,217,106), RGB(102,189,099), RGB(026,152,080)}; break; - case 09: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(255,255,191), RGB(217,239,139), RGB(166,217,106), RGB(102,189,099), RGB(026,152,080)}; break; - case 10: c = new[] {RGB(165,000,038), RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(217,239,139), RGB(166,217,106), RGB(102,189,099), RGB(026,152,080), RGB(000,104,055)}; break; - default: c = new[] { RGB(165, 000, 038), RGB(215, 048, 039), RGB(244, 109, 067), RGB(253, 174, 097), RGB(254, 224, 139), RGB(255, 255, 191), RGB(217, 239, 139), RGB(166, 217, 106), RGB(102, 189, 099), RGB(026, 152, 080), RGB(000, 104, 055) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {2, 2, 2, 0, 0, 0, 0, 0, 0}; - var @print = new[] {1, 1, 1, 2, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0, 0, 0}; - - return new Palette(c, "RdYlGn", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette RdBu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(239,138,098), RGB(247,247,247), RGB(103,169,207)}; break; - case 04: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(146,197,222), RGB(005,113,176)}; break; - case 05: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(247,247,247), RGB(146,197,222), RGB(005,113,176)}; break; - case 06: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(209,229,240), RGB(103,169,207), RGB(033,102,172)}; break; - case 07: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(247,247,247), RGB(209,229,240), RGB(103,169,207), RGB(033,102,172)}; break; - case 08: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(209,229,240), RGB(146,197,222), RGB(067,147,195), RGB(033,102,172)}; break; - case 09: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(247,247,247), RGB(209,229,240), RGB(146,197,222), RGB(067,147,195), RGB(033,102,172)}; break; - case 10: c = new[] {RGB(103,000,031), RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(209,229,240), RGB(146,197,222), RGB(067,147,195), RGB(033,102,172), RGB(005,048,097)}; break; - default: c = new[] { RGB(103, 000, 031), RGB(178, 024, 043), RGB(214, 096, 077), RGB(244, 165, 130), RGB(253, 219, 199), RGB(247, 247, 247), RGB(209, 229, 240), RGB(146, 197, 222), RGB(067, 147, 195), RGB(033, 102, 172), RGB(005, 048, 097) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 1, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0, 0, 0}; - - return new Palette(c, "RdBu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette PiYG (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(233,163,201), RGB(247,247,247), RGB(161,215,106)}; break; - case 04: c = new[] {RGB(208,028,139), RGB(241,182,218), RGB(184,225,134), RGB(077,172,038)}; break; - case 05: c = new[] {RGB(208,028,139), RGB(241,182,218), RGB(247,247,247), RGB(184,225,134), RGB(077,172,038)}; break; - case 06: c = new[] {RGB(197,027,125), RGB(233,163,201), RGB(253,224,239), RGB(230,245,208), RGB(161,215,106), RGB(077,146,033)}; break; - case 07: c = new[] {RGB(197,027,125), RGB(233,163,201), RGB(253,224,239), RGB(247,247,247), RGB(230,245,208), RGB(161,215,106), RGB(077,146,033)}; break; - case 08: c = new[] {RGB(197,027,125), RGB(222,119,174), RGB(241,182,218), RGB(253,224,239), RGB(230,245,208), RGB(184,225,134), RGB(127,188,065), RGB(077,146,033)}; break; - case 09: c = new[] {RGB(197,027,125), RGB(222,119,174), RGB(241,182,218), RGB(253,224,239), RGB(247,247,247), RGB(230,245,208), RGB(184,225,134), RGB(127,188,065), RGB(077,146,033)}; break; - case 10: c = new[] {RGB(142,001,082), RGB(197,027,125), RGB(222,119,174), RGB(241,182,218), RGB(253,224,239), RGB(230,245,208), RGB(184,225,134), RGB(127,188,065), RGB(077,146,033), RGB(039,100,025)}; break; - default: c = new[] { RGB(142, 001, 082), RGB(197, 027, 125), RGB(222, 119, 174), RGB(241, 182, 218), RGB(253, 224, 239), RGB(247, 247, 247), RGB(230, 245, 208), RGB(184, 225, 134), RGB(127, 188, 065), RGB(077, 146, 033), RGB(039, 100, 025) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 0, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0, 0, 0}; - - return new Palette(c, "PiYG", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette PRGn (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(175,141,195), RGB(247,247,247), RGB(127,191,123)}; break; - case 04: c = new[] {RGB(123,050,148), RGB(194,165,207), RGB(166,219,160), RGB(000,136,055)}; break; - case 05: c = new[] {RGB(123,050,148), RGB(194,165,207), RGB(247,247,247), RGB(166,219,160), RGB(000,136,055)}; break; - case 06: c = new[] {RGB(118,042,131), RGB(175,141,195), RGB(231,212,232), RGB(217,240,211), RGB(127,191,123), RGB(027,120,055)}; break; - case 07: c = new[] {RGB(118,042,131), RGB(175,141,195), RGB(231,212,232), RGB(247,247,247), RGB(217,240,211), RGB(127,191,123), RGB(027,120,055)}; break; - case 08: c = new[] {RGB(118,042,131), RGB(153,112,171), RGB(194,165,207), RGB(231,212,232), RGB(217,240,211), RGB(166,219,160), RGB(090,174,097), RGB(027,120,055)}; break; - case 09: c = new[] {RGB(118,042,131), RGB(153,112,171), RGB(194,165,207), RGB(231,212,232), RGB(247,247,247), RGB(217,240,211), RGB(166,219,160), RGB(090,174,097), RGB(027,120,055)}; break; - case 10: c = new[] {RGB(064,000,075), RGB(118,042,131), RGB(153,112,171), RGB(194,165,207), RGB(231,212,232), RGB(217,240,211), RGB(166,219,160), RGB(090,174,097), RGB(027,120,055), RGB(000,068,027)}; break; - default: c = new[] { RGB(064, 000, 075), RGB(118, 042, 131), RGB(153, 112, 171), RGB(194, 165, 207), RGB(231, 212, 232), RGB(247, 247, 247), RGB(217, 240, 211), RGB(166, 219, 160), RGB(090, 174, 097), RGB(027, 120, 055), RGB(000, 068, 027) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 1, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "PRGn", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette RdYlBu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(252,141,089), RGB(255,255,191), RGB(145,191,219)}; break; - case 04: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(171,217,233), RGB(044,123,182)}; break; - case 05: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(255,255,191), RGB(171,217,233), RGB(044,123,182)}; break; - case 06: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,144), RGB(224,243,248), RGB(145,191,219), RGB(069,117,180)}; break; - case 07: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,144), RGB(255,255,191), RGB(224,243,248), RGB(145,191,219), RGB(069,117,180)}; break; - case 08: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,144), RGB(224,243,248), RGB(171,217,233), RGB(116,173,209), RGB(069,117,180)}; break; - case 09: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,144), RGB(255,255,191), RGB(224,243,248), RGB(171,217,233), RGB(116,173,209), RGB(069,117,180)}; break; - case 10: c = new[] {RGB(165,000,038), RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,144), RGB(224,243,248), RGB(171,217,233), RGB(116,173,209), RGB(069,117,180), RGB(049,054,149)}; break; - default: c = new[] { RGB(165, 000, 038), RGB(215, 048, 039), RGB(244, 109, 067), RGB(253, 174, 097), RGB(254, 224, 144), RGB(255, 255, 191), RGB(224, 243, 248), RGB(171, 217, 233), RGB(116, 173, 209), RGB(069, 117, 180), RGB(049, 054, 149) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 1, 2, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "RdYlBu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette BrBG (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(216,179,101), RGB(245,245,245), RGB(090,180,172)}; break; - case 04: c = new[] {RGB(166,097,026), RGB(223,194,125), RGB(128,205,193), RGB(001,133,113)}; break; - case 05: c = new[] {RGB(166,097,026), RGB(223,194,125), RGB(245,245,245), RGB(128,205,193), RGB(001,133,113)}; break; - case 06: c = new[] {RGB(140,081,010), RGB(216,179,101), RGB(246,232,195), RGB(199,234,229), RGB(090,180,172), RGB(001,102,094)}; break; - case 07: c = new[] {RGB(140,081,010), RGB(216,179,101), RGB(246,232,195), RGB(245,245,245), RGB(199,234,229), RGB(090,180,172), RGB(001,102,094)}; break; - case 08: c = new[] {RGB(140,081,010), RGB(191,129,045), RGB(223,194,125), RGB(246,232,195), RGB(199,234,229), RGB(128,205,193), RGB(053,151,143), RGB(001,102,094)}; break; - case 09: c = new[] {RGB(140,081,010), RGB(191,129,045), RGB(223,194,125), RGB(246,232,195), RGB(245,245,245), RGB(199,234,229), RGB(128,205,193), RGB(053,151,143), RGB(001,102,094)}; break; - case 10: c = new[] {RGB(084,048,005), RGB(140,081,010), RGB(191,129,045), RGB(223,194,125), RGB(246,232,195), RGB(199,234,229), RGB(128,205,193), RGB(053,151,143), RGB(001,102,094), RGB(000,060,048)}; break; - default: c = new[] { RGB(084, 048, 005), RGB(140, 081, 010), RGB(191, 129, 045), RGB(223, 194, 125), RGB(246, 232, 195), RGB(245, 245, 245), RGB(199, 234, 229), RGB(128, 205, 193), RGB(053, 151, 143), RGB(001, 102, 094), RGB(000, 060, 048) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 1, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 1, 0, 0, 0, 0, 0}; - - return new Palette(c, "BrBG", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette RdGy (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(239,138,098), RGB(255,255,255), RGB(153,153,153)}; break; - case 04: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(186,186,186), RGB(064,064,064)}; break; - case 05: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(255,255,255), RGB(186,186,186), RGB(064,064,064)}; break; - case 06: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(224,224,224), RGB(153,153,153), RGB(077,077,077)}; break; - case 07: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(255,255,255), RGB(224,224,224), RGB(153,153,153), RGB(077,077,077)}; break; - case 08: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(224,224,224), RGB(186,186,186), RGB(135,135,135), RGB(077,077,077)}; break; - case 09: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(255,255,255), RGB(224,224,224), RGB(186,186,186), RGB(135,135,135), RGB(077,077,077)}; break; - case 10: c = new[] {RGB(103,000,031), RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(224,224,224), RGB(186,186,186), RGB(135,135,135), RGB(077,077,077), RGB(026,026,026)}; break; - default: c = new[] { RGB(103, 000, 031), RGB(178, 024, 043), RGB(214, 096, 077), RGB(244, 165, 130), RGB(253, 219, 199), RGB(255, 255, 255), RGB(224, 224, 224), RGB(186, 186, 186), RGB(135, 135, 135), RGB(077, 077, 077), RGB(026, 026, 026) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}; - var @print = new[] {1, 1, 1, 2, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0, 0, 0}; - - return new Palette(c, "RdGy", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette PuOr (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(241,163,064), RGB(247,247,247), RGB(153,142,195)}; break; - case 04: c = new[] {RGB(230,097,001), RGB(253,184,099), RGB(178,171,210), RGB(094,060,153)}; break; - case 05: c = new[] {RGB(230,097,001), RGB(253,184,099), RGB(247,247,247), RGB(178,171,210), RGB(094,060,153)}; break; - case 06: c = new[] {RGB(179,088,006), RGB(241,163,064), RGB(254,224,182), RGB(216,218,235), RGB(153,142,195), RGB(084,039,136)}; break; - case 07: c = new[] {RGB(179,088,006), RGB(241,163,064), RGB(254,224,182), RGB(247,247,247), RGB(216,218,235), RGB(153,142,195), RGB(084,039,136)}; break; - case 08: c = new[] {RGB(179,088,006), RGB(224,130,020), RGB(253,184,099), RGB(254,224,182), RGB(216,218,235), RGB(178,171,210), RGB(128,115,172), RGB(084,039,136)}; break; - case 09: c = new[] {RGB(179,088,006), RGB(224,130,020), RGB(253,184,099), RGB(254,224,182), RGB(247,247,247), RGB(216,218,235), RGB(178,171,210), RGB(128,115,172), RGB(084,039,136)}; break; - case 10: c = new[] {RGB(127,059,008), RGB(179,088,006), RGB(224,130,020), RGB(253,184,099), RGB(254,224,182), RGB(216,218,235), RGB(178,171,210), RGB(128,115,172), RGB(084,039,136), RGB(045,000,075)}; break; - default: c = new[] { RGB(127, 059, 008), RGB(179, 088, 006), RGB(224, 130, 020), RGB(253, 184, 099), RGB(254, 224, 182), RGB(247, 247, 247), RGB(216, 218, 235), RGB(178, 171, 210), RGB(128, 115, 172), RGB(084, 039, 136), RGB(045, 000, 075) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Diverging; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 2, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 1, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 1, 0, 0, 0, 0, 0}; - - return new Palette(c, "PuOr", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - /*** Qualitative ***/ - public static Palette Set2 (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203)}; break; - case 04: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195)}; break; - case 05: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195), RGB(166,216,084)}; break; - case 06: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195), RGB(166,216,084), RGB(255,217,047)}; break; - case 07: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195), RGB(166,216,084), RGB(255,217,047), RGB(229,196,148)}; break; - default: c = new[] { RGB(102, 194, 165), RGB(252, 141, 098), RGB(141, 160, 203), RGB(231, 138, 195), RGB(166, 216, 084), RGB(255, 217, 047), RGB(229, 196, 148), RGB(179, 179, 179) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {1, 2, 2, 2, 0, 0}; - var @print = new[] {1, 1, 1, 2, 2, 2}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 2, 2, 2}; - - return new Palette(c, "Set2", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Accent (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134)}; break; - case 04: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153)}; break; - case 05: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153), RGB(056,108,176)}; break; - case 06: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153), RGB(056,108,176), RGB(240,002,127)}; break; - case 07: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153), RGB(056,108,176), RGB(240,002,127), RGB(191,091,023)}; break; - default: c = new[] { RGB(127, 201, 127), RGB(190, 174, 212), RGB(253, 192, 134), RGB(255, 255, 153), RGB(056, 108, 176), RGB(240, 002, 127), RGB(191, 091, 023), RGB(102, 102, 102) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {2, 0, 0, 0, 0, 0}; - var @print = new[] {1, 1, 2, 2, 2, 2}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 2, 2, 2}; - - return new Palette(c, "Accent", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Set1 (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074)}; break; - case 04: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163)}; break; - case 05: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000)}; break; - case 06: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000), RGB(255,255,051)}; break; - case 07: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000), RGB(255,255,051), RGB(166,086,040)}; break; - case 08: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000), RGB(255,255,051), RGB(166,086,040), RGB(247,129,191)}; break; - default: c = new[] { RGB(228, 026, 028), RGB(055, 126, 184), RGB(077, 175, 074), RGB(152, 078, 163), RGB(255, 127, 000), RGB(255, 255, 051), RGB(166, 086, 040), RGB(247, 129, 191), RGB(153, 153, 153) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}; - var @print = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - - return new Palette(c, "Set1", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Set3 (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218)}; break; - case 04: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114)}; break; - case 05: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211)}; break; - case 06: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098)}; break; - case 07: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105)}; break; - case 08: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229)}; break; - case 09: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229), RGB(217,217,217)}; break; - case 10: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229), RGB(217,217,217), RGB(188,128,189)}; break; - case 11: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229), RGB(217,217,217), RGB(188,128,189), RGB(204,235,197)}; break; - default: c = new[] { RGB(141, 211, 199), RGB(255, 255, 179), RGB(190, 186, 218), RGB(251, 128, 114), RGB(128, 177, 211), RGB(253, 180, 098), RGB(179, 222, 105), RGB(252, 205, 229), RGB(217, 217, 217), RGB(188, 128, 189), RGB(204, 235, 197), RGB(255, 237, 111) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {2, 2, 0, 0, 0, 0, 0, 0, 0, 0}; - var @print = new[] {1, 1, 1, 1, 1, 1, 2, 0, 0, 0}; - var @xerox = new[] {1, 2, 2, 2, 2, 2, 2, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 2, 2, 2, 0, 0, 0, 0}; - - return new Palette(c, "Set3", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Dark2 (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179)}; break; - case 04: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138)}; break; - case 05: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138), RGB(102,166,030)}; break; - case 06: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138), RGB(102,166,030), RGB(230,171,002)}; break; - case 07: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138), RGB(102,166,030), RGB(230,171,002), RGB(166,118,029)}; break; - default: c = new[] { RGB(027, 158, 119), RGB(217, 095, 002), RGB(117, 112, 179), RGB(231, 041, 138), RGB(102, 166, 030), RGB(230, 171, 002), RGB(166, 118, 029), RGB(102, 102, 102) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {1, 2, 2, 2, 0, 0}; - var @print = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - - return new Palette(c, "Dark2", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Paired (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138)}; break; - case 04: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044)}; break; - case 05: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153)}; break; - case 06: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028)}; break; - case 07: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111)}; break; - case 08: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000)}; break; - case 09: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214)}; break; - case 10: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214), RGB(106,061,154)}; break; - case 11: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214), RGB(106,061,154), RGB(255,255,153)}; break; - default: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214), RGB(106,061,154), RGB(255,255,153), RGB(177,089,040)}; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {1, 1, 2, 2, 2, 2, 0, 0, 0, 0}; - var @print = new[] {1, 1, 1, 1, 1, 2, 2, 2, 2, 2}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 1, 1, 1, 1, 1, 2, 2}; - - return new Palette(c, "Paired", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Pastel2 (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232)}; break; - case 04: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228)}; break; - case 05: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228), RGB(230,245,201)}; break; - case 06: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228), RGB(230,245,201), RGB(255,242,174)}; break; - case 07: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228), RGB(230,245,201), RGB(255,242,174), RGB(241,226,204)}; break; - default: c = new[] { RGB(179, 226, 205), RGB(253, 205, 172), RGB(203, 213, 232), RGB(244, 202, 228), RGB(230, 245, 201), RGB(255, 242, 174), RGB(241, 226, 204), RGB(204, 204, 204) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {2, 0, 0, 0, 0, 0}; - var @print = new[] {2, 0, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {2, 2, 0, 0, 0, 0}; - - return new Palette(c, "Pastel2", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Pastel1 (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197)}; break; - case 04: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228)}; break; - case 05: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166)}; break; - case 06: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166), RGB(255,255,204)}; break; - case 07: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166), RGB(255,255,204), RGB(229,216,189)}; break; - case 08: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166), RGB(255,255,204), RGB(229,216,189), RGB(253,218,236)}; break; - default: c = new[] { RGB(251, 180, 174), RGB(179, 205, 227), RGB(204, 235, 197), RGB(222, 203, 228), RGB(254, 217, 166), RGB(255, 255, 204), RGB(229, 216, 189), RGB(253, 218, 236), RGB(242, 242, 242) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Qualitative; - var @blind = new[] {2, 0, 0, 0, 0, 0, 0}; - var @print = new[] {2, 2, 2, 0, 0, 0, 0}; - var @xerox = new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {2, 2, 2, 2, 0, 0, 0}; - - return new Palette(c, "Pastel1", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - /*** Sequential ***/ - public static Palette OrRd (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(254,232,200), RGB(253,187,132), RGB(227,074,051)}; break; - case 04: c = new[] {RGB(254,240,217), RGB(253,204,138), RGB(252,141,089), RGB(215,048,031)}; break; - case 05: c = new[] {RGB(254,240,217), RGB(253,204,138), RGB(252,141,089), RGB(227,074,051), RGB(179,000,0)}; break; - case 06: c = new[] {RGB(254,240,217), RGB(253,212,158), RGB(253,187,132), RGB(252,141,089), RGB(227,074,051), RGB(179,000,0)}; break; - case 07: c = new[] {RGB(254,240,217), RGB(253,212,158), RGB(253,187,132), RGB(252,141,089), RGB(239,101,072), RGB(215,048,031), RGB(153,000,0)}; break; - case 08: c = new[] {RGB(255,247,236), RGB(254,232,200), RGB(253,212,158), RGB(253,187,132), RGB(252,141,089), RGB(239,101,072), RGB(215,048,031), RGB(153,000,0)}; break; - default: c = new[] { RGB(255, 247, 236), RGB(254, 232, 200), RGB(253, 212, 158), RGB(253, 187, 132), RGB(252, 141, 089), RGB(239, 101, 072), RGB(215, 048, 031), RGB(179, 000, 0), RGB(127, 000, 0) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 1, 2, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0}; - - return new Palette(c, "OrRd", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette PuBu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(236,231,242), RGB(166,189,219), RGB(043,140,190)}; break; - case 04: c = new[] {RGB(241,238,246), RGB(189,201,225), RGB(116,169,207), RGB(005,112,176)}; break; - case 05: c = new[] {RGB(241,238,246), RGB(189,201,225), RGB(116,169,207), RGB(043,140,190), RGB(004,090,141)}; break; - case 06: c = new[] {RGB(241,238,246), RGB(208,209,230), RGB(166,189,219), RGB(116,169,207), RGB(043,140,190), RGB(004,090,141)}; break; - case 07: c = new[] {RGB(241,238,246), RGB(208,209,230), RGB(166,189,219), RGB(116,169,207), RGB(054,144,192), RGB(005,112,176), RGB(003,078,123)}; break; - case 08: c = new[] {RGB(255,247,251), RGB(236,231,242), RGB(208,209,230), RGB(166,189,219), RGB(116,169,207), RGB(054,144,192), RGB(005,112,176), RGB(003,078,123)}; break; - default: c = new[] { RGB(255, 247, 251), RGB(236, 231, 242), RGB(208, 209, 230), RGB(166, 189, 219), RGB(116, 169, 207), RGB(054, 144, 192), RGB(005, 112, 176), RGB(004, 090, 141), RGB(002, 056, 088) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 2, 2, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0}; - - return new Palette(c, "PuBu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette BuPu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(224,236,244), RGB(158,188,218), RGB(136,086,167)}; break; - case 04: c = new[] {RGB(237,248,251), RGB(179,205,227), RGB(140,150,198), RGB(136,065,157)}; break; - case 05: c = new[] {RGB(237,248,251), RGB(179,205,227), RGB(140,150,198), RGB(136,086,167), RGB(129,015,124)}; break; - case 06: c = new[] {RGB(237,248,251), RGB(191,211,230), RGB(158,188,218), RGB(140,150,198), RGB(136,086,167), RGB(129,015,124)}; break; - case 07: c = new[] {RGB(237,248,251), RGB(191,211,230), RGB(158,188,218), RGB(140,150,198), RGB(140,107,177), RGB(136,065,157), RGB(110,001,107)}; break; - case 08: c = new[] {RGB(247,252,253), RGB(224,236,244), RGB(191,211,230), RGB(158,188,218), RGB(140,150,198), RGB(140,107,177), RGB(136,065,157), RGB(110,001,107)}; break; - default: c = new[] { RGB(247, 252, 253), RGB(224, 236, 244), RGB(191, 211, 230), RGB(158, 188, 218), RGB(140, 150, 198), RGB(140, 107, 177), RGB(136, 065, 157), RGB(129, 015, 124), RGB(077, 000, 075) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 2, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0}; - - return new Palette(c, "BuPu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Oranges (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(254,230,206), RGB(253,174,107), RGB(230,085,013)}; break; - case 04: c = new[] {RGB(254,237,222), RGB(253,190,133), RGB(253,141,060), RGB(217,071,001)}; break; - case 05: c = new[] {RGB(254,237,222), RGB(253,190,133), RGB(253,141,060), RGB(230,085,013), RGB(166,054,003)}; break; - case 06: c = new[] {RGB(254,237,222), RGB(253,208,162), RGB(253,174,107), RGB(253,141,060), RGB(230,085,013), RGB(166,054,003)}; break; - case 07: c = new[] {RGB(254,237,222), RGB(253,208,162), RGB(253,174,107), RGB(253,141,060), RGB(241,105,019), RGB(217,072,001), RGB(140,045,004)}; break; - case 08: c = new[] {RGB(255,245,235), RGB(254,230,206), RGB(253,208,162), RGB(253,174,107), RGB(253,141,060), RGB(241,105,019), RGB(217,072,001), RGB(140,045,004)}; break; - default: c = new[] { RGB(255, 245, 235), RGB(254, 230, 206), RGB(253, 208, 162), RGB(253, 174, 107), RGB(253, 141, 060), RGB(241, 105, 019), RGB(217, 072, 001), RGB(166, 054, 003), RGB(127, 039, 004) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 2, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 2, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0}; - - return new Palette(c, "Oranges", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette BuGn (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(229,245,249), RGB(153,216,201), RGB(044,162,095)}; break; - case 04: c = new[] {RGB(237,248,251), RGB(178,226,226), RGB(102,194,164), RGB(035,139,069)}; break; - case 05: c = new[] {RGB(237,248,251), RGB(178,226,226), RGB(102,194,164), RGB(044,162,095), RGB(000,109,044)}; break; - case 06: c = new[] {RGB(237,248,251), RGB(204,236,230), RGB(153,216,201), RGB(102,194,164), RGB(044,162,095), RGB(000,109,044)}; break; - case 07: c = new[] {RGB(237,248,251), RGB(204,236,230), RGB(153,216,201), RGB(102,194,164), RGB(065,174,118), RGB(035,139,069), RGB(000,088,036)}; break; - case 08: c = new[] {RGB(247,252,253), RGB(229,245,249), RGB(204,236,230), RGB(153,216,201), RGB(102,194,164), RGB(065,174,118), RGB(035,139,069), RGB(000,088,036)}; break; - default: c = new[] { RGB(247, 252, 253), RGB(229, 245, 249), RGB(204, 236, 230), RGB(153, 216, 201), RGB(102, 194, 164), RGB(065, 174, 118), RGB(035, 139, 069), RGB(000, 109, 044), RGB(000, 068, 027) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "BuGn", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette YlOrBr (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(255,247,188), RGB(254,196,079), RGB(217,095,014)}; break; - case 04: c = new[] {RGB(255,255,212), RGB(254,217,142), RGB(254,153,041), RGB(204,076,002)}; break; - case 05: c = new[] {RGB(255,255,212), RGB(254,217,142), RGB(254,153,041), RGB(217,095,014), RGB(153,052,004)}; break; - case 06: c = new[] {RGB(255,255,212), RGB(254,227,145), RGB(254,196,079), RGB(254,153,041), RGB(217,095,014), RGB(153,052,004)}; break; - case 07: c = new[] {RGB(255,255,212), RGB(254,227,145), RGB(254,196,079), RGB(254,153,041), RGB(236,112,020), RGB(204,076,002), RGB(140,045,004)}; break; - case 08: c = new[] {RGB(255,255,229), RGB(255,247,188), RGB(254,227,145), RGB(254,196,079), RGB(254,153,041), RGB(236,112,020), RGB(204,076,002), RGB(140,045,004)}; break; - default: c = new[] { RGB(255, 255, 229), RGB(255, 247, 188), RGB(254, 227, 145), RGB(254, 196, 079), RGB(254, 153, 041), RGB(236, 112, 020), RGB(204, 076, 002), RGB(153, 052, 004), RGB(102, 037, 006) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 2, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "YlOrBr", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette YlGn (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(247,252,185), RGB(173,221,142), RGB(049,163,084)}; break; - case 04: c = new[] {RGB(255,255,204), RGB(194,230,153), RGB(120,198,121), RGB(035,132,067)}; break; - case 05: c = new[] {RGB(255,255,204), RGB(194,230,153), RGB(120,198,121), RGB(049,163,084), RGB(000,104,055)}; break; - case 06: c = new[] {RGB(255,255,204), RGB(217,240,163), RGB(173,221,142), RGB(120,198,121), RGB(049,163,084), RGB(000,104,055)}; break; - case 07: c = new[] {RGB(255,255,204), RGB(217,240,163), RGB(173,221,142), RGB(120,198,121), RGB(065,171,093), RGB(035,132,067), RGB(000,090,050)}; break; - case 08: c = new[] {RGB(255,255,229), RGB(247,252,185), RGB(217,240,163), RGB(173,221,142), RGB(120,198,121), RGB(065,171,093), RGB(035,132,067), RGB(000,090,050)}; break; - default: c = new[] { RGB(255, 255, 229), RGB(247, 252, 185), RGB(217, 240, 163), RGB(173, 221, 142), RGB(120, 198, 121), RGB(065, 171, 093), RGB(035, 132, 067), RGB(000, 104, 055), RGB(000, 069, 041) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0}; - - return new Palette(c, "YlGn", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Reds (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(254,224,210), RGB(252,146,114), RGB(222,045,038)}; break; - case 04: c = new[] {RGB(254,229,217), RGB(252,174,145), RGB(251,106,074), RGB(203,024,029)}; break; - case 05: c = new[] {RGB(254,229,217), RGB(252,174,145), RGB(251,106,074), RGB(222,045,038), RGB(165,015,021)}; break; - case 06: c = new[] {RGB(254,229,217), RGB(252,187,161), RGB(252,146,114), RGB(251,106,074), RGB(222,045,038), RGB(165,015,021)}; break; - case 07: c = new[] {RGB(254,229,217), RGB(252,187,161), RGB(252,146,114), RGB(251,106,074), RGB(239,059,044), RGB(203,024,029), RGB(153,000,013)}; break; - case 08: c = new[] {RGB(255,245,240), RGB(254,224,210), RGB(252,187,161), RGB(252,146,114), RGB(251,106,074), RGB(239,059,044), RGB(203,024,029), RGB(153,000,013)}; break; - default: c = new[] { RGB(255, 245, 240), RGB(254, 224, 210), RGB(252, 187, 161), RGB(252, 146, 114), RGB(251, 106, 074), RGB(239, 059, 044), RGB(203, 024, 029), RGB(165, 015, 021), RGB(103, 000, 013) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 2, 2, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "Reds", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette RdPu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(253,224,221), RGB(250,159,181), RGB(197,027,138)}; break; - case 04: c = new[] {RGB(254,235,226), RGB(251,180,185), RGB(247,104,161), RGB(174,001,126)}; break; - case 05: c = new[] {RGB(254,235,226), RGB(251,180,185), RGB(247,104,161), RGB(197,027,138), RGB(122,001,119)}; break; - case 06: c = new[] {RGB(254,235,226), RGB(252,197,192), RGB(250,159,181), RGB(247,104,161), RGB(197,027,138), RGB(122,001,119)}; break; - case 07: c = new[] {RGB(254,235,226), RGB(252,197,192), RGB(250,159,181), RGB(247,104,161), RGB(221,052,151), RGB(174,001,126), RGB(122,001,119)}; break; - case 08: c = new[] {RGB(255,247,243), RGB(253,224,221), RGB(252,197,192), RGB(250,159,181), RGB(247,104,161), RGB(221,052,151), RGB(174,001,126), RGB(122,001,119)}; break; - default: c = new[] { RGB(255, 247, 243), RGB(253, 224, 221), RGB(252, 197, 192), RGB(250, 159, 181), RGB(247, 104, 161), RGB(221, 052, 151), RGB(174, 001, 126), RGB(122, 001, 119), RGB(073, 000, 106) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 2, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0}; - - return new Palette(c, "RdPu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Greens (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(229,245,224), RGB(161,217,155), RGB(049,163,084)}; break; - case 04: c = new[] {RGB(237,248,233), RGB(186,228,179), RGB(116,196,118), RGB(035,139,069)}; break; - case 05: c = new[] {RGB(237,248,233), RGB(186,228,179), RGB(116,196,118), RGB(049,163,084), RGB(000,109,044)}; break; - case 06: c = new[] {RGB(237,248,233), RGB(199,233,192), RGB(161,217,155), RGB(116,196,118), RGB(049,163,084), RGB(000,109,044)}; break; - case 07: c = new[] {RGB(237,248,233), RGB(199,233,192), RGB(161,217,155), RGB(116,196,118), RGB(065,171,093), RGB(035,139,069), RGB(000,090,050)}; break; - case 08: c = new[] {RGB(247,252,245), RGB(229,245,224), RGB(199,233,192), RGB(161,217,155), RGB(116,196,118), RGB(065,171,093), RGB(035,139,069), RGB(000,090,050)}; break; - default: c = new[] { RGB(247, 252, 245), RGB(229, 245, 224), RGB(199, 233, 192), RGB(161, 217, 155), RGB(116, 196, 118), RGB(065, 171, 093), RGB(035, 139, 069), RGB(000, 109, 044), RGB(000, 068, 027) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 0, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "Greens", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette YlGnBu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(237,248,177), RGB(127,205,187), RGB(044,127,184)}; break; - case 04: c = new[] {RGB(255,255,204), RGB(161,218,180), RGB(065,182,196), RGB(034,094,168)}; break; - case 05: c = new[] {RGB(255,255,204), RGB(161,218,180), RGB(065,182,196), RGB(044,127,184), RGB(037,052,148)}; break; - case 06: c = new[] {RGB(255,255,204), RGB(199,233,180), RGB(127,205,187), RGB(065,182,196), RGB(044,127,184), RGB(037,052,148)}; break; - case 07: c = new[] {RGB(255,255,204), RGB(199,233,180), RGB(127,205,187), RGB(065,182,196), RGB(029,145,192), RGB(034,094,168), RGB(012,044,132)}; break; - case 08: c = new[] {RGB(255,255,217), RGB(237,248,177), RGB(199,233,180), RGB(127,205,187), RGB(065,182,196), RGB(029,145,192), RGB(034,094,168), RGB(012,044,132)}; break; - default: c = new[] { RGB(255, 255, 217), RGB(237, 248, 177), RGB(199, 233, 180), RGB(127, 205, 187), RGB(065, 182, 196), RGB(029, 145, 192), RGB(034, 094, 168), RGB(037, 052, 148), RGB(008, 029, 088) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 2, 2, 2, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0}; - - return new Palette(c, "YlGnBu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Purples (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(239,237,245), RGB(188,189,220), RGB(117,107,177)}; break; - case 04: c = new[] {RGB(242,240,247), RGB(203,201,226), RGB(158,154,200), RGB(106,081,163)}; break; - case 05: c = new[] {RGB(242,240,247), RGB(203,201,226), RGB(158,154,200), RGB(117,107,177), RGB(084,039,143)}; break; - case 06: c = new[] {RGB(242,240,247), RGB(218,218,235), RGB(188,189,220), RGB(158,154,200), RGB(117,107,177), RGB(084,039,143)}; break; - case 07: c = new[] {RGB(242,240,247), RGB(218,218,235), RGB(188,189,220), RGB(158,154,200), RGB(128,125,186), RGB(106,081,163), RGB(074,020,134)}; break; - case 08: c = new[] {RGB(252,251,253), RGB(239,237,245), RGB(218,218,235), RGB(188,189,220), RGB(158,154,200), RGB(128,125,186), RGB(106,081,163), RGB(074,020,134)}; break; - default: c = new[] { RGB(252, 251, 253), RGB(239, 237, 245), RGB(218, 218, 235), RGB(188, 189, 220), RGB(158, 154, 200), RGB(128, 125, 186), RGB(106, 081, 163), RGB(084, 039, 143), RGB(063, 000, 125) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 0, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 0, 0, 0, 0, 0, 0}; - - return new Palette(c, "Purples", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette GnBu (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(224,243,219), RGB(168,221,181), RGB(067,162,202)}; break; - case 04: c = new[] {RGB(240,249,232), RGB(186,228,188), RGB(123,204,196), RGB(043,140,190)}; break; - case 05: c = new[] {RGB(240,249,232), RGB(186,228,188), RGB(123,204,196), RGB(067,162,202), RGB(008,104,172)}; break; - case 06: c = new[] {RGB(240,249,232), RGB(204,235,197), RGB(168,221,181), RGB(123,204,196), RGB(067,162,202), RGB(008,104,172)}; break; - case 07: c = new[] {RGB(240,249,232), RGB(204,235,197), RGB(168,221,181), RGB(123,204,196), RGB(078,179,211), RGB(043,140,190), RGB(008,088,158)}; break; - case 08: c = new[] {RGB(247,252,240), RGB(224,243,219), RGB(204,235,197), RGB(168,221,181), RGB(123,204,196), RGB(078,179,211), RGB(043,140,190), RGB(008,088,158)}; break; - default: c = new[] { RGB(247, 252, 240), RGB(224, 243, 219), RGB(204, 235, 197), RGB(168, 221, 181), RGB(123, 204, 196), RGB(078, 179, 211), RGB(043, 140, 190), RGB(008, 104, 172), RGB(008, 064, 129) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 2, 2, 2, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0}; - - return new Palette(c, "GnBu", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Greys (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(240,240,240), RGB(189,189,189), RGB(099,099,099)}; break; - case 04: c = new[] {RGB(247,247,247), RGB(204,204,204), RGB(150,150,150), RGB(082,082,082)}; break; - case 05: c = new[] {RGB(247,247,247), RGB(204,204,204), RGB(150,150,150), RGB(099,099,099), RGB(037,037,037)}; break; - case 06: c = new[] {RGB(247,247,247), RGB(217,217,217), RGB(189,189,189), RGB(150,150,150), RGB(099,099,099), RGB(037,037,037)}; break; - case 07: c = new[] {RGB(247,247,247), RGB(217,217,217), RGB(189,189,189), RGB(150,150,150), RGB(115,115,115), RGB(082,082,082), RGB(037,037,037)}; break; - case 08: c = new[] {RGB(255,255,255), RGB(240,240,240), RGB(217,217,217), RGB(189,189,189), RGB(150,150,150), RGB(115,115,115), RGB(082,082,082), RGB(037,037,037)}; break; - default: c = new[] { RGB(255, 255, 255), RGB(240, 240, 240), RGB(217, 217, 217), RGB(189, 189, 189), RGB(150, 150, 150), RGB(115, 115, 115), RGB(082, 082, 082), RGB(037, 037, 037), RGB(000, 0, 000) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 0, 0, 0, 0}; - var @xerox = new[] {1, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "Greys", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette YlOrRd (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(255,237,160), RGB(254,178,076), RGB(240,059,032)}; break; - case 04: c = new[] {RGB(255,255,178), RGB(254,204,092), RGB(253,141,060), RGB(227,026,028)}; break; - case 05: c = new[] {RGB(255,255,178), RGB(254,204,092), RGB(253,141,060), RGB(240,059,032), RGB(189,000,038)}; break; - case 06: c = new[] {RGB(255,255,178), RGB(254,217,118), RGB(254,178,076), RGB(253,141,060), RGB(240,059,032), RGB(189,000,038)}; break; - case 07: c = new[] {RGB(255,255,178), RGB(254,217,118), RGB(254,178,076), RGB(253,141,060), RGB(252,078,042), RGB(227,026,028), RGB(177,000,038)}; break; - case 08: c = new[] {RGB(255,255,204), RGB(255,237,160), RGB(254,217,118), RGB(254,178,076), RGB(253,141,060), RGB(252,078,042), RGB(227,026,028), RGB(177,000,038)}; break; - default: c = new[] { RGB(255, 255, 204), RGB(255, 237, 160), RGB(254, 217, 118), RGB(254, 178, 076), RGB(253, 141, 060), RGB(252, 078, 042), RGB(227, 026, 028), RGB(189, 000, 038), RGB(128, 000, 038) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 2, 2, 0, 0, 0}; - var @xerox = new[] {1, 2, 2, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 2, 0, 0, 0, 0}; - - return new Palette(c, "YlOrRd", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette PuRd (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(231,225,239), RGB(201,148,199), RGB(221,028,119)}; break; - case 04: c = new[] {RGB(241,238,246), RGB(215,181,216), RGB(223,101,176), RGB(206,018,086)}; break; - case 05: c = new[] {RGB(241,238,246), RGB(215,181,216), RGB(223,101,176), RGB(221,028,119), RGB(152,000,067)}; break; - case 06: c = new[] {RGB(241,238,246), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(221,028,119), RGB(152,000,067)}; break; - case 07: c = new[] {RGB(241,238,246), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(231,041,138), RGB(206,018,086), RGB(145,000,063)}; break; - case 08: c = new[] {RGB(247,244,249), RGB(231,225,239), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(231,041,138), RGB(206,018,086), RGB(145,000,063)}; break; - default: c = new[] {RGB(247,244,249), RGB(231,225,239), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(231,041,138), RGB(206,018,086), RGB(152,000,067), RGB(103,000,031)}; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 1, 1, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 1, 0, 0, 0, 0}; - - return new Palette(c, "PuRd", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette Blues (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(222,235,247), RGB(158,202,225), RGB(049,130,189)}; break; - case 04: c = new[] {RGB(239,243,255), RGB(189,215,231), RGB(107,174,214), RGB(033,113,181)}; break; - case 05: c = new[] {RGB(239,243,255), RGB(189,215,231), RGB(107,174,214), RGB(049,130,189), RGB(008,081,156)}; break; - case 06: c = new[] {RGB(239,243,255), RGB(198,219,239), RGB(158,202,225), RGB(107,174,214), RGB(049,130,189), RGB(008,081,156)}; break; - case 07: c = new[] {RGB(239,243,255), RGB(198,219,239), RGB(158,202,225), RGB(107,174,214), RGB(066,146,198), RGB(033,113,181), RGB(008,069,148)}; break; - case 08: c = new[] {RGB(247,251,255), RGB(222,235,247), RGB(198,219,239), RGB(158,202,225), RGB(107,174,214), RGB(066,146,198), RGB(033,113,181), RGB(008,069,148)}; break; - default: c = new[] { RGB(247, 251, 255), RGB(222, 235, 247), RGB(198, 219, 239), RGB(158, 202, 225), RGB(107, 174, 214), RGB(066, 146, 198), RGB(033, 113, 181), RGB(008, 081, 156), RGB(008, 048, 107) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 2, 0, 0, 0, 0, 0}; - var @xerox = new[] {1, 0, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 2, 0, 0, 0, 0, 0}; - - return new Palette(c, "Blues", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - - } - public static Palette PuBuGn (int size) { - Color32[] c; - switch (size) { - case 03: c = new[] {RGB(236,226,240), RGB(166,189,219), RGB(028,144,153)}; break; - case 04: c = new[] {RGB(246,239,247), RGB(189,201,225), RGB(103,169,207), RGB(002,129,138)}; break; - case 05: c = new[] {RGB(246,239,247), RGB(189,201,225), RGB(103,169,207), RGB(028,144,153), RGB(001,108,089)}; break; - case 06: c = new[] {RGB(246,239,247), RGB(208,209,230), RGB(166,189,219), RGB(103,169,207), RGB(028,144,153), RGB(001,108,089)}; break; - case 07: c = new[] {RGB(246,239,247), RGB(208,209,230), RGB(166,189,219), RGB(103,169,207), RGB(054,144,192), RGB(002,129,138), RGB(001,100,080)}; break; - case 08: c = new[] {RGB(255,247,251), RGB(236,226,240), RGB(208,209,230), RGB(166,189,219), RGB(103,169,207), RGB(054,144,192), RGB(002,129,138), RGB(001,100,080)}; break; - default: c = new[] { RGB(255, 247, 251), RGB(236, 226, 240), RGB(208, 209, 230), RGB(166, 189, 219), RGB(103, 169, 207), RGB(054, 144, 192), RGB(002, 129, 138), RGB(001, 108, 089), RGB(001, 070, 054) }; break; - //default: goto case 03; - } - if (size > c.Length) size = c.Length; - var @type = Palette.Kind.Sequential; - var @blind = new[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - var @print = new[] {1, 2, 2, 0, 0, 0, 0}; - var @xerox = new[] {1, 2, 0, 0, 0, 0, 0}; - var @panel = new[] {1, 1, 2, 0, 0, 0, 0}; - - return new Palette(c, "PuBuGn", @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]); - } - - - - - } - -} \ No newline at end of file diff --git a/SCANsat/SCAN_Platform/Palettes/ColorBrewer/Include/Original.cs b/SCANsat/SCAN_Platform/Palettes/ColorBrewer/Include/Original.cs deleted file mode 100644 index 09d88ce4d..000000000 --- a/SCANsat/SCAN_Platform/Palettes/ColorBrewer/Include/Original.cs +++ /dev/null @@ -1,731 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCAN Color Brewer Originals - Original Color Brewer palettes for reference and the methods for porting them to C# - * - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using System; -using System.Text.RegularExpressions; -using Color32 = UnityEngine.Color32; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -namespace SCANsat.SCAN_Platform.Palettes.ColorBrewer.Include -{ - public class Original - { - /* REGEX INSTRUCTIONS AND EXPLANTION - * In order to do this transformation systematically from the source, I - * resorted to judicious use of regular expressions. - * - * First, some (small) cosmetic things: - * - * 1. Make the labels all be 2 digits (must be run twice, for some reason): - * (?[\(\)\,])(?\d\d)(?[\(\)\,]) - * ${begin}0${twodigit}${end} - * xn - * - * 2. Prefix all 1-digit color values with two 0's: - * (?[\(\)\,])(?\d)(?[\(\)\,]) - * ${begin}00${onedigit}${end} - * xn - * - * 3. Prefix all 1-digit palette size values with a 0: - * (?[\s]+)(?\d)(?[:]) - * ${begin}0${onedigit}${end} - * xn - * - * Using this, we can transform the input (which is not C# friendly in any way) to something - * more satisfactory to our needs. - * - * NOTE: The index (ie, the 3: or 4: before each line) is redundant; it can be inferred - * from the length of the color lists themselves. - * - * Now, for processing the overall file: - * - * 4. This regular expression matches key(int)-value(Color array), line by line: - * (?\s+) (?\d+)(?\:)\ (?\[)(?[^\[.]+) (?\])(?,) - * ${indent} case ${size}: c = new[] {${arr}}; break; - * nx - * - * - * 4a. Other alternative replace regexes I considered were: - * ${indent} ${size}${op}${open}${arr}${close}${delim} - * ${indent} Color32[] c${size} = {${arr}}; - * - * 5. [RGB to new Color32] I used the following regular expression: - * 'rgb \( (?\d+), (?\d+), (?\d+) \)' - * RGB(${r},${g},${b}) - * nx - * - * - * 6. This expression converts the name into a C# method decleration: - * ^(?
\s+)(?[\w]+):\s+\{(?\s+)
-		 * 		${pre}public static Color32[] ${name} (int size) {${post}Color32[] c;${post}switch (size) {${post}
-		 *		mn
-		 * 
-		 * 7. For now, let's just get rid of all the properties:
-		 * 		(?\s+)('properties':\ {(?\n)[^}]+})
-		 * 		${indent} default: goto case 03;${indent}}
-		 * 		nx
-		 * 
-		 * 7a. Convert the properties themselves into var < > = <>:
-		 * 		'(?\w+)'(?:)(?\ )(?[^\n].+)
-		 * 		var @${key} = ${value}
-		 * 		nx
-		 * 
-		 * 8. Get rid of the starting var colorbrewer =
-		 * 		^var colorbrewer = {(?\s+)
-		 * 		 ${n}
-		 * 
-		 * 9. Change "}," to end the methods.
-		 * 
-		 * 10. Manually fixup the very last }, so that it has a return after it. :(
-		 */
-
-		public static void Main () {
-			string input = fromText();
-
-			var nx = RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture;
-			var mn = RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace;
-
-			var one		= new Regex(@"(?[\(\)\,])(?\d\d)(?[\(\)\,])",nx);
-			var two		= new Regex(@"(?[\(\)\,])(?\d)(?[\(\)\,])",nx);
-			var three	= new Regex(@"(?[\s]+)(?\d)(?[:])",nx);
-			var four	= new Regex(@"(?\s+) (?\d+)(?\:)\ (?\[)(?[^\[.]+) (?\])(?,)",nx);
-			var five	= new Regex(@"'rgb \( (?\d+), (?\d+), (?\d+) \)'",nx);
-			var six		= new Regex(@"^(?
\s+)(?[\w]+):\s+\{(?\s+)",mn);
-			var sevenA	= new Regex(@"'(?\w+)'(?:)(?\ )(?[^\n].+)",nx);
-			var sevenB	= new Regex(@"\[(?\d)\]",nx);
-			var sevenC	= new Regex(@"(?\s+)('properties':\ {(?\n)(?[^}]+)})",nx);
-			var eight	= new Regex(@"^var colorbrewer = {(?\s+)");
-			var nine	= new Regex(@"(?\s+)(?},)(?\n)",nx);
-
-			var after1	= one.Replace(input		,@"${begin}0${twodigit}${end}");
-			var after1a	= one.Replace(after1	,@"${begin}0${twodigit}${end}");
-			var after2	= two.Replace(after1a	,@"${begin}00${onedigit}${end}");
-			var after3	= three.Replace(after2	,@"${begin}0${onedigit}${end}");
-			var after4	= four.Replace(after3	,@"${indent} case ${size}: c = new[] {${arr}}; break;");
-			var after5	= five.Replace(after4	,@"RGB(${r},${g},${b})");
-			var after6	= six.Replace(after5	,@"${pre}public static Palette ${name} (int size) {${post}Color32[] c;${post}switch (size) {${post}");
-			var after7a	= sevenA.Replace(after6	,@"var @${key} = ${value};");
-			var after7b	= sevenB.Replace(after7a,@"[${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}]");
-			var after7c	= sevenC.Replace(after7b,@"${indent} default: goto case 03;${indent}}${n}${stuff}");
-			var after8	= eight.Replace(after7c	,@"${n}");
-			var after9 	= nine.Replace(after8	,@"${indent}return new Palette(c, @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]);${indent}}${n}");
-
-
-			IDictionary map = new Dictionary() {
-				{"'div'",	"Palette.Kind.Diverging"},
-				{"'seq'",	"Palette.Kind.Sequential"},
-				{"'qual'",	"Palette.Kind.Qualitative"},
-				{"= [",		"= new[] {"},
-				{"],;",		"};"},
-				{"];",		"};"},
-				{",;",		";"},
-				{"copy",	"xerox"},
-				{"screen",	"panel"},
-			};
-			var mapRegex = new Regex(String.Join ("|", (string[])map.Keys.Select (k => Regex.Escape (k))));
-			var afterMap = mapRegex.Replace(after9, m => map [m.Value]);
-			Console.WriteLine(afterMap);
-		}
-	
-		public static string fromText() {
-			return 
-@"var colorbrewer = {
-    /*** Diverging ***/
-    Spectral: {
-      3: ['rgb(252,141,89)', 'rgb(255,255,191)', 'rgb(153,213,148)'],
-      4: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(171,221,164)', 'rgb(43,131,186)'],
-      5: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(255,255,191)', 'rgb(171,221,164)', 'rgb(43,131,186)'],
-      6: ['rgb(213,62,79)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(230,245,152)', 'rgb(153,213,148)', 'rgb(50,136,189)'],
-      7: ['rgb(213,62,79)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(230,245,152)', 'rgb(153,213,148)', 'rgb(50,136,189)'],
-      8: ['rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)'],
-      9: ['rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)'],
-      10: ['rgb(158,1,66)', 'rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)', 'rgb(94,79,162)'],
-      11: ['rgb(158,1,66)', 'rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)', 'rgb(94,79,162)'],
-      'properties': {
-        'type': 'div',
-        'blind': [2, 2, 2, 0, 0, 0, 0, 0, 0],
-        'print': [1, 1, 1, 0, 0, 0, 0, 0, 0],
-        'copy': [1, 1, 1, 0, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 2, 0, 0, 0, 0, 0, 0]
-      }
-    },
-    RdYlGn: {
-      3: ['rgb(252,141,89)', 'rgb(255,255,191)', 'rgb(145,207,96)'],
-      4: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(166,217,106)', 'rgb(26,150,65)'],
-      5: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(255,255,191)', 'rgb(166,217,106)', 'rgb(26,150,65)'],
-      6: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(217,239,139)', 'rgb(145,207,96)', 'rgb(26,152,80)'],
-      7: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(217,239,139)', 'rgb(145,207,96)', 'rgb(26,152,80)'],
-      8: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)'],
-      9: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)'],
-      10: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)', 'rgb(0,104,55)'],
-      11: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)', 'rgb(0,104,55)'],
-      'properties': {
-        'type': 'div',
-        'blind': [2, 2, 2, 0, 0, 0, 0, 0, 0],
-        'print': [1, 1, 1, 2, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 1, 0, 0, 0, 0, 0, 0]
-      }
-    },
-    RdBu: {
-      3: ['rgb(239,138,98)', 'rgb(247,247,247)', 'rgb(103,169,207)'],
-      4: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(146,197,222)', 'rgb(5,113,176)'],
-      5: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(247,247,247)', 'rgb(146,197,222)', 'rgb(5,113,176)'],
-      6: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(209,229,240)', 'rgb(103,169,207)', 'rgb(33,102,172)'],
-      7: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(247,247,247)', 'rgb(209,229,240)', 'rgb(103,169,207)', 'rgb(33,102,172)'],
-      8: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)'],
-      9: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(247,247,247)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)'],
-      10: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)', 'rgb(5,48,97)'],
-      11: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(247,247,247)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)', 'rgb(5,48,97)'],
-      'properties': {
-        'type': 'div',
-        'blind': [1],
-        'print': [1, 1, 1, 1, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 1, 0, 0, 0, 0, 0, 0]
-      }
-    },
-    PiYG: {
-      3: ['rgb(233,163,201)', 'rgb(247,247,247)', 'rgb(161,215,106)'],
-      4: ['rgb(208,28,139)', 'rgb(241,182,218)', 'rgb(184,225,134)', 'rgb(77,172,38)'],
-      5: ['rgb(208,28,139)', 'rgb(241,182,218)', 'rgb(247,247,247)', 'rgb(184,225,134)', 'rgb(77,172,38)'],
-      6: ['rgb(197,27,125)', 'rgb(233,163,201)', 'rgb(253,224,239)', 'rgb(230,245,208)', 'rgb(161,215,106)', 'rgb(77,146,33)'],
-      7: ['rgb(197,27,125)', 'rgb(233,163,201)', 'rgb(253,224,239)', 'rgb(247,247,247)', 'rgb(230,245,208)', 'rgb(161,215,106)', 'rgb(77,146,33)'],
-      8: ['rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)'],
-      9: ['rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(247,247,247)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)'],
-      10: ['rgb(142,1,82)', 'rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)', 'rgb(39,100,25)'],
-      11: ['rgb(142,1,82)', 'rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(247,247,247)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)', 'rgb(39,100,25)'],
-      'properties': {
-        'type': 'div',
-        'blind': [1],
-        'print': [1, 1, 2, 0, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 2, 0, 0, 0, 0, 0, 0]
-      }
-    },
-    PRGn: {
-      3: ['rgb(175,141,195)', 'rgb(247,247,247)', 'rgb(127,191,123)'],
-      4: ['rgb(123,50,148)', 'rgb(194,165,207)', 'rgb(166,219,160)', 'rgb(0,136,55)'],
-      5: ['rgb(123,50,148)', 'rgb(194,165,207)', 'rgb(247,247,247)', 'rgb(166,219,160)', 'rgb(0,136,55)'],
-      6: ['rgb(118,42,131)', 'rgb(175,141,195)', 'rgb(231,212,232)', 'rgb(217,240,211)', 'rgb(127,191,123)', 'rgb(27,120,55)'],
-      7: ['rgb(118,42,131)', 'rgb(175,141,195)', 'rgb(231,212,232)', 'rgb(247,247,247)', 'rgb(217,240,211)', 'rgb(127,191,123)', 'rgb(27,120,55)'],
-      8: ['rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)'],
-      9: ['rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(247,247,247)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)'],
-      10: ['rgb(64,0,75)', 'rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)', 'rgb(0,68,27)'],
-      11: ['rgb(64,0,75)', 'rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(247,247,247)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)', 'rgb(0,68,27)'],
-      'properties': {
-        'type': 'div',
-        'blind': [1],
-        'print': [1, 1, 1, 1, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 2, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    RdYlBu: {
-      3: ['rgb(252,141,89)', 'rgb(255,255,191)', 'rgb(145,191,219)'],
-      4: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(171,217,233)', 'rgb(44,123,182)'],
-      5: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(255,255,191)', 'rgb(171,217,233)', 'rgb(44,123,182)'],
-      6: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,144)', 'rgb(224,243,248)', 'rgb(145,191,219)', 'rgb(69,117,180)'],
-      7: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,144)', 'rgb(255,255,191)', 'rgb(224,243,248)', 'rgb(145,191,219)', 'rgb(69,117,180)'],
-      8: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)'],
-      9: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(255,255,191)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)'],
-      10: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)', 'rgb(49,54,149)'],
-      11: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(255,255,191)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)', 'rgb(49,54,149)'],
-      'properties': {
-        'type': 'div',
-        'blind': [1],
-        'print': [1, 1, 1, 1, 2, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    BrBG: {
-      3: ['rgb(216,179,101)', 'rgb(245,245,245)', 'rgb(90,180,172)'],
-      4: ['rgb(166,97,26)', 'rgb(223,194,125)', 'rgb(128,205,193)', 'rgb(1,133,113)'],
-      5: ['rgb(166,97,26)', 'rgb(223,194,125)', 'rgb(245,245,245)', 'rgb(128,205,193)', 'rgb(1,133,113)'],
-      6: ['rgb(140,81,10)', 'rgb(216,179,101)', 'rgb(246,232,195)', 'rgb(199,234,229)', 'rgb(90,180,172)', 'rgb(1,102,94)'],
-      7: ['rgb(140,81,10)', 'rgb(216,179,101)', 'rgb(246,232,195)', 'rgb(245,245,245)', 'rgb(199,234,229)', 'rgb(90,180,172)', 'rgb(1,102,94)'],
-      8: ['rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)'],
-      9: ['rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(245,245,245)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)'],
-      10: ['rgb(84,48,5)', 'rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)', 'rgb(0,60,48)'],
-      11: ['rgb(84,48,5)', 'rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(245,245,245)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)', 'rgb(0,60,48)'],
-      'properties': {
-        'type': 'div',
-        'blind': [1],
-        'print': [1, 1, 1, 1, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 1, 1, 0, 0, 0, 0, 0]
-      }
-    },
-    RdGy: {
-      3: ['rgb(239,138,98)', 'rgb(255,255,255)', 'rgb(153,153,153)'],
-      4: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(186,186,186)', 'rgb(64,64,64)'],
-      5: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(255,255,255)', 'rgb(186,186,186)', 'rgb(64,64,64)'],
-      6: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(224,224,224)', 'rgb(153,153,153)', 'rgb(77,77,77)'],
-      7: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(255,255,255)', 'rgb(224,224,224)', 'rgb(153,153,153)', 'rgb(77,77,77)'],
-      8: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)'],
-      9: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(255,255,255)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)'],
-      10: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)', 'rgb(26,26,26)'],
-      11: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(255,255,255)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)', 'rgb(26,26,26)'],
-      'properties': {
-        'type': 'div',
-        'blind': [2],
-        'print': [1, 1, 1, 2, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [1, 1, 2, 0, 0, 0, 0, 0, 0]
-      }
-    },
-    PuOr: {
-      3: ['rgb(241,163,64)', 'rgb(247,247,247)', 'rgb(153,142,195)'],
-      4: ['rgb(230,97,1)', 'rgb(253,184,99)', 'rgb(178,171,210)', 'rgb(94,60,153)'],
-      5: ['rgb(230,97,1)', 'rgb(253,184,99)', 'rgb(247,247,247)', 'rgb(178,171,210)', 'rgb(94,60,153)'],
-      6: ['rgb(179,88,6)', 'rgb(241,163,64)', 'rgb(254,224,182)', 'rgb(216,218,235)', 'rgb(153,142,195)', 'rgb(84,39,136)'],
-      7: ['rgb(179,88,6)', 'rgb(241,163,64)', 'rgb(254,224,182)', 'rgb(247,247,247)', 'rgb(216,218,235)', 'rgb(153,142,195)', 'rgb(84,39,136)'],
-      8: ['rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)'],
-      9: ['rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(247,247,247)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)'],
-      10: ['rgb(127,59,8)', 'rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)', 'rgb(45,0,75)'],
-      11: ['rgb(127,59,8)', 'rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(247,247,247)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)', 'rgb(45,0,75)'],
-      'properties': {
-        'type': 'div',
-        'blind': [1],
-        'print': [1, 1, 2, 2, 0, 0, 0, 0, 0],
-        'copy': [1, 1, 0, 0, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 1, 0, 0, 0, 0, 0]
-      }
-    },
-    /*** Qualitative ***/
-    Set2: {
-      3: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)'],
-      4: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)'],
-      5: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)'],
-      6: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)', 'rgb(255,217,47)'],
-      7: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)', 'rgb(255,217,47)', 'rgb(229,196,148)'],
-      8: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)', 'rgb(255,217,47)', 'rgb(229,196,148)', 'rgb(179,179,179)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [1, 2, 2, 2, 0, 0],
-        'print': [1, 1, 1, 2, 2, 2],
-        'copy': [0],
-        'screen': [1, 1, 2, 2, 2, 2]
-      }
-    },
-    Accent: {
-      3: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)'],
-      4: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)'],
-      5: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)'],
-      6: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)', 'rgb(240,2,127)'],
-      7: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)', 'rgb(240,2,127)', 'rgb(191,91,23)'],
-      8: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)', 'rgb(240,2,127)', 'rgb(191,91,23)', 'rgb(102,102,102)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [2, 0, 0, 0, 0, 0],
-        'print': [1, 1, 2, 2, 2, 2],
-        'copy': [0],
-        'screen': [1, 1, 1, 2, 2, 2]
-      }
-    },
-    Set1: {
-      3: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)'],
-      4: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)'],
-      5: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)'],
-      6: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)'],
-      7: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)'],
-      8: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)', 'rgb(247,129,191)'],
-      9: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)', 'rgb(247,129,191)', 'rgb(153,153,153)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [2],
-        'print': [1],
-        'copy': [0],
-        'screen': [1]
-      }
-    },
-    Set3: {
-      3: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)'],
-      4: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)'],
-      5: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)'],
-      6: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)'],
-      7: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)'],
-      8: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)'],
-      9: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)'],
-      10: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)', 'rgb(188,128,189)'],
-      11: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)', 'rgb(188,128,189)', 'rgb(204,235,197)'],
-      12: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)', 'rgb(188,128,189)', 'rgb(204,235,197)', 'rgb(255,237,111)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [2, 2, 0, 0, 0, 0, 0, 0, 0, 0],
-        'print': [1, 1, 1, 1, 1, 1, 2, 0, 0, 0],
-        'copy': [1, 2, 2, 2, 2, 2, 2, 0, 0, 0],
-        'screen': [1, 1, 1, 2, 2, 2, 0, 0, 0, 0]
-      }
-    },
-    Dark2: {
-      3: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)'],
-      4: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)'],
-      5: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)'],
-      6: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)', 'rgb(230,171,2)'],
-      7: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)', 'rgb(230,171,2)', 'rgb(166,118,29)'],
-      8: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)', 'rgb(230,171,2)', 'rgb(166,118,29)', 'rgb(102,102,102)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [1, 2, 2, 2, 0, 0],
-        'print': [1],
-        'copy': [0],
-        'screen': [1]
-      }
-    },
-    Paired: {
-      3: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)'],
-      4: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)'],
-      5: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)'],
-      6: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)'],
-      7: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)'],
-      8: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)'],
-      9: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)'],
-      10: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)', 'rgb(106,61,154)'],
-      11: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)', 'rgb(106,61,154)', 'rgb(255,255,153)'],
-      12: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)', 'rgb(106,61,154)', 'rgb(255,255,153)', 'rgb(177,89,40)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [1, 1, 2, 2, 2, 2, 0, 0, 0],
-        'print': [1, 1, 1, 1, 1, 2, 2, 2, 2],
-        'copy': [0],
-        'screen': [1, 1, 1, 1, 1, 1, 1, 1, 2]
-      }
-    },
-    Pastel2: {
-      3: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)'],
-      4: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)'],
-      5: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)'],
-      6: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)', 'rgb(255,242,174)'],
-      7: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)', 'rgb(255,242,174)', 'rgb(241,226,204)'],
-      8: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)', 'rgb(255,242,174)', 'rgb(241,226,204)', 'rgb(204,204,204)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [2, 0, 0, 0, 0, 0],
-        'print': [2, 0, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [2, 2, 0, 0, 0, 0]
-      }
-    },
-    Pastel1: {
-      3: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)'],
-      4: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)'],
-      5: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)'],
-      6: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)'],
-      7: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)', 'rgb(229,216,189)'],
-      8: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)', 'rgb(229,216,189)', 'rgb(253,218,236)'],
-      9: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)', 'rgb(229,216,189)', 'rgb(253,218,236)', 'rgb(242,242,242)'],
-      'properties': {
-        'type': 'qual',
-        'blind': [2, 0, 0, 0, 0, 0, 0],
-        'print': [2, 2, 2, 0, 0, 0, 0],
-        'copy': [0],
-        'screen': [2, 2, 2, 2, 0, 0, 0]
-      }
-    },
-    /*** Sequential ***/
-    OrRd: {
-      3: ['rgb(254,232,200)', 'rgb(253,187,132)', 'rgb(227,74,51)'],
-      4: ['rgb(254,240,217)', 'rgb(253,204,138)', 'rgb(252,141,89)', 'rgb(215,48,31)'],
-      5: ['rgb(254,240,217)', 'rgb(253,204,138)', 'rgb(252,141,89)', 'rgb(227,74,51)', 'rgb(179,0,0)'],
-      6: ['rgb(254,240,217)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(227,74,51)', 'rgb(179,0,0)'],
-      7: ['rgb(254,240,217)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(239,101,72)', 'rgb(215,48,31)', 'rgb(153,0,0)'],
-      8: ['rgb(255,247,236)', 'rgb(254,232,200)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(239,101,72)', 'rgb(215,48,31)', 'rgb(153,0,0)'],
-      9: ['rgb(255,247,236)', 'rgb(254,232,200)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(239,101,72)', 'rgb(215,48,31)', 'rgb(179,0,0)', 'rgb(127,0,0)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 0, 0, 0, 0, 0],
-        'copy': [1, 1, 2, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 0, 0, 0, 0]
-      }
-    },
-    PuBu: {
-      3: ['rgb(236,231,242)', 'rgb(166,189,219)', 'rgb(43,140,190)'],
-      4: ['rgb(241,238,246)', 'rgb(189,201,225)', 'rgb(116,169,207)', 'rgb(5,112,176)'],
-      5: ['rgb(241,238,246)', 'rgb(189,201,225)', 'rgb(116,169,207)', 'rgb(43,140,190)', 'rgb(4,90,141)'],
-      6: ['rgb(241,238,246)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(43,140,190)', 'rgb(4,90,141)'],
-      7: ['rgb(241,238,246)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(54,144,192)', 'rgb(5,112,176)', 'rgb(3,78,123)'],
-      8: ['rgb(255,247,251)', 'rgb(236,231,242)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(54,144,192)', 'rgb(5,112,176)', 'rgb(3,78,123)'],
-      9: ['rgb(255,247,251)', 'rgb(236,231,242)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(54,144,192)', 'rgb(5,112,176)', 'rgb(4,90,141)', 'rgb(2,56,88)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 2, 2, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 2, 0, 0, 0, 0]
-      }
-    },
-    BuPu: {
-      3: ['rgb(224,236,244)', 'rgb(158,188,218)', 'rgb(136,86,167)'],
-      4: ['rgb(237,248,251)', 'rgb(179,205,227)', 'rgb(140,150,198)', 'rgb(136,65,157)'],
-      5: ['rgb(237,248,251)', 'rgb(179,205,227)', 'rgb(140,150,198)', 'rgb(136,86,167)', 'rgb(129,15,124)'],
-      6: ['rgb(237,248,251)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(136,86,167)', 'rgb(129,15,124)'],
-      7: ['rgb(237,248,251)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(140,107,177)', 'rgb(136,65,157)', 'rgb(110,1,107)'],
-      8: ['rgb(247,252,253)', 'rgb(224,236,244)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(140,107,177)', 'rgb(136,65,157)', 'rgb(110,1,107)'],
-      9: ['rgb(247,252,253)', 'rgb(224,236,244)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(140,107,177)', 'rgb(136,65,157)', 'rgb(129,15,124)', 'rgb(77,0,75)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 2, 2, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 0, 0, 0, 0]
-      }
-    },
-    Oranges: {
-      3: ['rgb(254,230,206)', 'rgb(253,174,107)', 'rgb(230,85,13)'],
-      4: ['rgb(254,237,222)', 'rgb(253,190,133)', 'rgb(253,141,60)', 'rgb(217,71,1)'],
-      5: ['rgb(254,237,222)', 'rgb(253,190,133)', 'rgb(253,141,60)', 'rgb(230,85,13)', 'rgb(166,54,3)'],
-      6: ['rgb(254,237,222)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(230,85,13)', 'rgb(166,54,3)'],
-      7: ['rgb(254,237,222)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(241,105,19)', 'rgb(217,72,1)', 'rgb(140,45,4)'],
-      8: ['rgb(255,245,235)', 'rgb(254,230,206)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(241,105,19)', 'rgb(217,72,1)', 'rgb(140,45,4)'],
-      9: ['rgb(255,245,235)', 'rgb(254,230,206)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(241,105,19)', 'rgb(217,72,1)', 'rgb(166,54,3)', 'rgb(127,39,4)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 2, 0, 0, 0, 0, 0],
-        'copy': [1, 2, 2, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 0, 0, 0, 0]
-      }
-    },
-    BuGn: {
-      3: ['rgb(229,245,249)', 'rgb(153,216,201)', 'rgb(44,162,95)'],
-      4: ['rgb(237,248,251)', 'rgb(178,226,226)', 'rgb(102,194,164)', 'rgb(35,139,69)'],
-      5: ['rgb(237,248,251)', 'rgb(178,226,226)', 'rgb(102,194,164)', 'rgb(44,162,95)', 'rgb(0,109,44)'],
-      6: ['rgb(237,248,251)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(44,162,95)', 'rgb(0,109,44)'],
-      7: ['rgb(237,248,251)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(65,174,118)', 'rgb(35,139,69)', 'rgb(0,88,36)'],
-      8: ['rgb(247,252,253)', 'rgb(229,245,249)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(65,174,118)', 'rgb(35,139,69)', 'rgb(0,88,36)'],
-      9: ['rgb(247,252,253)', 'rgb(229,245,249)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(65,174,118)', 'rgb(35,139,69)', 'rgb(0,109,44)', 'rgb(0,68,27)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 2, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    YlOrBr: {
-      3: ['rgb(255,247,188)', 'rgb(254,196,79)', 'rgb(217,95,14)'],
-      4: ['rgb(255,255,212)', 'rgb(254,217,142)', 'rgb(254,153,41)', 'rgb(204,76,2)'],
-      5: ['rgb(255,255,212)', 'rgb(254,217,142)', 'rgb(254,153,41)', 'rgb(217,95,14)', 'rgb(153,52,4)'],
-      6: ['rgb(255,255,212)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(217,95,14)', 'rgb(153,52,4)'],
-      7: ['rgb(255,255,212)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(236,112,20)', 'rgb(204,76,2)', 'rgb(140,45,4)'],
-      8: ['rgb(255,255,229)', 'rgb(255,247,188)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(236,112,20)', 'rgb(204,76,2)', 'rgb(140,45,4)'],
-      9: ['rgb(255,255,229)', 'rgb(255,247,188)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(236,112,20)', 'rgb(204,76,2)', 'rgb(153,52,4)', 'rgb(102,37,6)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 2, 0, 0, 0, 0],
-        'copy': [1, 2, 2, 0, 0, 0, 0],
-        'screen': [1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    YlGn: {
-      3: ['rgb(247,252,185)', 'rgb(173,221,142)', 'rgb(49,163,84)'],
-      4: ['rgb(255,255,204)', 'rgb(194,230,153)', 'rgb(120,198,121)', 'rgb(35,132,67)'],
-      5: ['rgb(255,255,204)', 'rgb(194,230,153)', 'rgb(120,198,121)', 'rgb(49,163,84)', 'rgb(0,104,55)'],
-      6: ['rgb(255,255,204)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(49,163,84)', 'rgb(0,104,55)'],
-      7: ['rgb(255,255,204)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(65,171,93)', 'rgb(35,132,67)', 'rgb(0,90,50)'],
-      8: ['rgb(255,255,229)', 'rgb(247,252,185)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(65,171,93)', 'rgb(35,132,67)', 'rgb(0,90,50)'],
-      9: ['rgb(255,255,229)', 'rgb(247,252,185)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(65,171,93)', 'rgb(35,132,67)', 'rgb(0,104,55)', 'rgb(0,69,41)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 1, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 0, 0, 0, 0]
-      }
-    },
-    Reds: {
-      3: ['rgb(254,224,210)', 'rgb(252,146,114)', 'rgb(222,45,38)'],
-      4: ['rgb(254,229,217)', 'rgb(252,174,145)', 'rgb(251,106,74)', 'rgb(203,24,29)'],
-      5: ['rgb(254,229,217)', 'rgb(252,174,145)', 'rgb(251,106,74)', 'rgb(222,45,38)', 'rgb(165,15,21)'],
-      6: ['rgb(254,229,217)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(222,45,38)', 'rgb(165,15,21)'],
-      7: ['rgb(254,229,217)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(239,59,44)', 'rgb(203,24,29)', 'rgb(153,0,13)'],
-      8: ['rgb(255,245,240)', 'rgb(254,224,210)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(239,59,44)', 'rgb(203,24,29)', 'rgb(153,0,13)'],
-      9: ['rgb(255,245,240)', 'rgb(254,224,210)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(239,59,44)', 'rgb(203,24,29)', 'rgb(165,15,21)', 'rgb(103,0,13)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 2, 2, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    RdPu: {
-      3: ['rgb(253,224,221)', 'rgb(250,159,181)', 'rgb(197,27,138)'],
-      4: ['rgb(254,235,226)', 'rgb(251,180,185)', 'rgb(247,104,161)', 'rgb(174,1,126)'],
-      5: ['rgb(254,235,226)', 'rgb(251,180,185)', 'rgb(247,104,161)', 'rgb(197,27,138)', 'rgb(122,1,119)'],
-      6: ['rgb(254,235,226)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(197,27,138)', 'rgb(122,1,119)'],
-      7: ['rgb(254,235,226)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(221,52,151)', 'rgb(174,1,126)', 'rgb(122,1,119)'],
-      8: ['rgb(255,247,243)', 'rgb(253,224,221)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(221,52,151)', 'rgb(174,1,126)', 'rgb(122,1,119)'],
-      9: ['rgb(255,247,243)', 'rgb(253,224,221)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(221,52,151)', 'rgb(174,1,126)', 'rgb(122,1,119)', 'rgb(73,0,106)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 1, 2, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 0, 0, 0, 0]
-      }
-    },
-    Greens: {
-      3: ['rgb(229,245,224)', 'rgb(161,217,155)', 'rgb(49,163,84)'],
-      4: ['rgb(237,248,233)', 'rgb(186,228,179)', 'rgb(116,196,118)', 'rgb(35,139,69)'],
-      5: ['rgb(237,248,233)', 'rgb(186,228,179)', 'rgb(116,196,118)', 'rgb(49,163,84)', 'rgb(0,109,44)'],
-      6: ['rgb(237,248,233)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(49,163,84)', 'rgb(0,109,44)'],
-      7: ['rgb(237,248,233)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(65,171,93)', 'rgb(35,139,69)', 'rgb(0,90,50)'],
-      8: ['rgb(247,252,245)', 'rgb(229,245,224)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(65,171,93)', 'rgb(35,139,69)', 'rgb(0,90,50)'],
-      9: ['rgb(247,252,245)', 'rgb(229,245,224)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(65,171,93)', 'rgb(35,139,69)', 'rgb(0,109,44)', 'rgb(0,68,27)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 0, 0, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    YlGnBu: {
-      3: ['rgb(237,248,177)', 'rgb(127,205,187)', 'rgb(44,127,184)'],
-      4: ['rgb(255,255,204)', 'rgb(161,218,180)', 'rgb(65,182,196)', 'rgb(34,94,168)'],
-      5: ['rgb(255,255,204)', 'rgb(161,218,180)', 'rgb(65,182,196)', 'rgb(44,127,184)', 'rgb(37,52,148)'],
-      6: ['rgb(255,255,204)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(44,127,184)', 'rgb(37,52,148)'],
-      7: ['rgb(255,255,204)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(12,44,132)'],
-      8: ['rgb(255,255,217)', 'rgb(237,248,177)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(12,44,132)'],
-      9: ['rgb(255,255,217)', 'rgb(237,248,177)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(37,52,148)', 'rgb(8,29,88)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 1, 2, 2, 2, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 2, 0, 0, 0, 0]
-      }
-    },
-    Purples: {
-      3: ['rgb(239,237,245)', 'rgb(188,189,220)', 'rgb(117,107,177)'],
-      4: ['rgb(242,240,247)', 'rgb(203,201,226)', 'rgb(158,154,200)', 'rgb(106,81,163)'],
-      5: ['rgb(242,240,247)', 'rgb(203,201,226)', 'rgb(158,154,200)', 'rgb(117,107,177)', 'rgb(84,39,143)'],
-      6: ['rgb(242,240,247)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(117,107,177)', 'rgb(84,39,143)'],
-      7: ['rgb(242,240,247)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(128,125,186)', 'rgb(106,81,163)', 'rgb(74,20,134)'],
-      8: ['rgb(252,251,253)', 'rgb(239,237,245)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(128,125,186)', 'rgb(106,81,163)', 'rgb(74,20,134)'],
-      9: ['rgb(252,251,253)', 'rgb(239,237,245)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(128,125,186)', 'rgb(106,81,163)', 'rgb(84,39,143)', 'rgb(63,0,125)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 0, 0, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 0, 0, 0, 0, 0, 0]
-      }
-    },
-    GnBu: {
-      3: ['rgb(224,243,219)', 'rgb(168,221,181)', 'rgb(67,162,202)'],
-      4: ['rgb(240,249,232)', 'rgb(186,228,188)', 'rgb(123,204,196)', 'rgb(43,140,190)'],
-      5: ['rgb(240,249,232)', 'rgb(186,228,188)', 'rgb(123,204,196)', 'rgb(67,162,202)', 'rgb(8,104,172)'],
-      6: ['rgb(240,249,232)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(67,162,202)', 'rgb(8,104,172)'],
-      7: ['rgb(240,249,232)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,88,158)'],
-      8: ['rgb(247,252,240)', 'rgb(224,243,219)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,88,158)'],
-      9: ['rgb(247,252,240)', 'rgb(224,243,219)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,104,172)', 'rgb(8,64,129)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 1, 2, 2, 2, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 2, 0, 0, 0, 0]
-      }
-    },
-    Greys: {
-      3: ['rgb(240,240,240)', 'rgb(189,189,189)', 'rgb(99,99,99)'],
-      4: ['rgb(247,247,247)', 'rgb(204,204,204)', 'rgb(150,150,150)', 'rgb(82,82,82)'],
-      5: ['rgb(247,247,247)', 'rgb(204,204,204)', 'rgb(150,150,150)', 'rgb(99,99,99)', 'rgb(37,37,37)'],
-      6: ['rgb(247,247,247)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(99,99,99)', 'rgb(37,37,37)'],
-      7: ['rgb(247,247,247)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(115,115,115)', 'rgb(82,82,82)', 'rgb(37,37,37)'],
-      8: ['rgb(255,255,255)', 'rgb(240,240,240)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(115,115,115)', 'rgb(82,82,82)', 'rgb(37,37,37)'],
-      9: ['rgb(255,255,255)', 'rgb(240,240,240)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(115,115,115)', 'rgb(82,82,82)', 'rgb(37,37,37)', 'rgb(0,0,0)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 2, 0, 0, 0, 0],
-        'copy': [1, 0, 0, 0, 0, 0, 0],
-        'screen': [1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    YlOrRd: {
-      3: ['rgb(255,237,160)', 'rgb(254,178,76)', 'rgb(240,59,32)'],
-      4: ['rgb(255,255,178)', 'rgb(254,204,92)', 'rgb(253,141,60)', 'rgb(227,26,28)'],
-      5: ['rgb(255,255,178)', 'rgb(254,204,92)', 'rgb(253,141,60)', 'rgb(240,59,32)', 'rgb(189,0,38)'],
-      6: ['rgb(255,255,178)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(240,59,32)', 'rgb(189,0,38)'],
-      7: ['rgb(255,255,178)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(252,78,42)', 'rgb(227,26,28)', 'rgb(177,0,38)'],
-      8: ['rgb(255,255,204)', 'rgb(255,237,160)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(252,78,42)', 'rgb(227,26,28)', 'rgb(177,0,38)'],
-      9: ['rgb(255,255,204)', 'rgb(255,237,160)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(252,78,42)', 'rgb(227,26,28)', 'rgb(189,0,38)', 'rgb(128,0,38)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 2, 2, 0, 0, 0],
-        'copy': [1, 2, 2, 0, 0, 0, 0],
-        'screen': [1, 2, 2, 0, 0, 0, 0]
-      }
-    },
-    PuRd: {
-      3: ['rgb(231,225,239)', 'rgb(201,148,199)', 'rgb(221,28,119)'],
-      4: ['rgb(241,238,246)', 'rgb(215,181,216)', 'rgb(223,101,176)', 'rgb(206,18,86)'],
-      5: ['rgb(241,238,246)', 'rgb(215,181,216)', 'rgb(223,101,176)', 'rgb(221,28,119)', 'rgb(152,0,67)'],
-      6: ['rgb(241,238,246)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(221,28,119)', 'rgb(152,0,67)'],
-      7: ['rgb(241,238,246)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(231,41,138)', 'rgb(206,18,86)', 'rgb(145,0,63)'],
-      8: ['rgb(247,244,249)', 'rgb(231,225,239)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(231,41,138)', 'rgb(206,18,86)', 'rgb(145,0,63)'],
-      9: ['rgb(247,244,249)', 'rgb(231,225,239)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(231,41,138)', 'rgb(206,18,86)', 'rgb(152,0,67)', 'rgb(103,0,31)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 1, 1, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 1, 0, 0, 0, 0]
-      }
-    },
-    Blues: {
-      3: ['rgb(222,235,247)', 'rgb(158,202,225)', 'rgb(49,130,189)'],
-      4: ['rgb(239,243,255)', 'rgb(189,215,231)', 'rgb(107,174,214)', 'rgb(33,113,181)'],
-      5: ['rgb(239,243,255)', 'rgb(189,215,231)', 'rgb(107,174,214)', 'rgb(49,130,189)', 'rgb(8,81,156)'],
-      6: ['rgb(239,243,255)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(49,130,189)', 'rgb(8,81,156)'],
-      7: ['rgb(239,243,255)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(66,146,198)', 'rgb(33,113,181)', 'rgb(8,69,148)'],
-      8: ['rgb(247,251,255)', 'rgb(222,235,247)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(66,146,198)', 'rgb(33,113,181)', 'rgb(8,69,148)'],
-      9: ['rgb(247,251,255)', 'rgb(222,235,247)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(66,146,198)', 'rgb(33,113,181)', 'rgb(8,81,156)', 'rgb(8,48,107)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 2, 0, 0, 0, 0, 0],
-        'copy': [1, 0, 0, 0, 0, 0, 0],
-        'screen': [1, 2, 0, 0, 0, 0, 0]
-      }
-    },
-    PuBuGn: {
-      3: ['rgb(236,226,240)', 'rgb(166,189,219)', 'rgb(28,144,153)'],
-      4: ['rgb(246,239,247)', 'rgb(189,201,225)', 'rgb(103,169,207)', 'rgb(2,129,138)'],
-      5: ['rgb(246,239,247)', 'rgb(189,201,225)', 'rgb(103,169,207)', 'rgb(28,144,153)', 'rgb(1,108,89)'],
-      6: ['rgb(246,239,247)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(28,144,153)', 'rgb(1,108,89)'],
-      7: ['rgb(246,239,247)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(54,144,192)', 'rgb(2,129,138)', 'rgb(1,100,80)'],
-      8: ['rgb(255,247,251)', 'rgb(236,226,240)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(54,144,192)', 'rgb(2,129,138)', 'rgb(1,100,80)'],
-      9: ['rgb(255,247,251)', 'rgb(236,226,240)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(54,144,192)', 'rgb(2,129,138)', 'rgb(1,108,89)', 'rgb(1,70,54)'],
-      'properties': {
-        'type': 'seq',
-        'blind': [1],
-        'print': [1, 2, 2, 0, 0, 0, 0],
-        'copy': [1, 2, 0, 0, 0, 0, 0],
-        'screen': [1, 1, 2, 0, 0, 0, 0]
-      }
-    }
-";}
-	}
-}
-
diff --git a/SCANsat/SCAN_Platform/Palettes/FixedColors/FixedColorPalettes.cs b/SCANsat/SCAN_Platform/Palettes/FixedColors/FixedColorPalettes.cs
deleted file mode 100644
index dcc05bca5..000000000
--- a/SCANsat/SCAN_Platform/Palettes/FixedColors/FixedColorPalettes.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-#region license
-/* 
- * [Scientific Committee on Advanced Navigation]
- * 			S.C.A.N. Satellite
- *
- * SCAN FixedColorPalettes - static class for generating fixed size color palettes; see each palette for licensing information
- * 
- * Copyright (c)2014 David Grandy ;
- * Copyright (c)2014 technogeeky ;
- * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
- */
-#endregion
-
-using System;
-using UnityEngine;
-
-namespace SCANsat.SCAN_Platform.Palettes.FixedColors
-{
-	public static class FixedColorPalettes
-	{
-		static Func RGB = (r, g, b) => new Color32(r, g, b, 255);
-
-		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
-		 * Black Forest Scheme - Schwarzwald-topographie - http://commons.wikimedia.org/wiki/File:Schwarzwald-topographie.png
-		 * */
-		public static Palette blackForest()
-		{
-			Color32[] c;
-			c = new[] { RGB(176, 243, 190), RGB(224, 251, 178), RGB(184, 222, 118), RGB(39, 165, 42), RGB(52, 136, 60), RGB(156,164,41), RGB(248,176,4), RGB(192,74,2), RGB(135,8,0), RGB(116,24,5), RGB(108,42,10), RGB(125,74,43), RGB(156,129,112), RGB(181,181,181), RGB(218,216,218)};
-			return new Palette(c, "blackForest", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* A freely available color scheme by Mark J. Fenbers
-		 * http://soliton.vm.bytemark.co.uk/pub/cpt-city/mjf/copying.html
-		 * */
-		public static Palette departure()
-		{
-			Color32[] c;
-			c = new[] { RGB(68, 34, 0), RGB(102, 51, 0), RGB(160, 108, 60), RGB(218, 166, 120), RGB(238, 212, 188), RGB(255, 255, 255), RGB(200, 255, 200), RGB(100, 255, 100), RGB(0, 255, 0), RGB(0, 192, 0), RGB(0, 128, 0) };
-			return new Palette(c, "departure", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
-		 * http://commons.wikimedia.org/wiki/File:North_Rhine-Westphalia_Topography_01.svg
-		 * */
-		public static Palette northRhine()
-		{
-			Color32[] c;
-			c = new[] { RGB(5, 6, 3), RGB(55, 55, 36), RGB(24, 62, 41), RGB(52, 105, 69), RGB(62, 138, 89), RGB(108, 163, 99), RGB(165, 186, 111), RGB(231, 213, 122), RGB(199, 167, 92), RGB(176, 120, 58) };
-			return new Palette(c, "northRhine", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
-		 * Mars color scheme by PZmaps - http://commons.wikimedia.org/wiki/User:PZmaps
-		 * */
-		public static Palette mars()
-		{
-			Color32[] c;
-			c = new[] { RGB(120, 65, 20), RGB(141, 84, 43), RGB(164, 114, 66), RGB(188, 144, 89), RGB(211, 174, 112), RGB(235, 205, 136), RGB(219, 185, 120), RGB(204, 165, 105), RGB(189, 145, 90), RGB(174, 125, 75), RGB(159, 110, 70), RGB(160, 120, 80), RGB(174, 134, 100), RGB(189, 163, 140), RGB(204, 191, 180), RGB(220, 212, 205), RGB(240, 232, 225), RGB(255, 255, 255) };
-			return new Palette(c, "mars", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		//A public domain Wikipedia color scheme - http://soliton.vm.bytemark.co.uk/pub/cpt-city/wkp/template/index.html
-		public static Palette wiki2()
-		{
-			Color32[] c;
-			c = new[] { RGB(113, 171, 216), RGB(216, 242, 254), RGB(148, 191, 139), RGB(239, 235, 192), RGB(170, 135, 83), RGB(245, 244, 242) };
-			return new Palette(c, "wiki2", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
-		 * Plumbago Scheme- http://en.wikipedia.org/wiki/File:AYool_topography_15min.png
-		 * */
-		public static Palette plumbago()
-		{
-			Color32[] c;
-			c = new[] { RGB(151, 0, 176), RGB(23, 0, 151), RGB(203, 254, 254), RGB(0, 168, 0), RGB(254, 254, 126), RGB(87, 36, 36), RGB(203, 101, 203), RGB(228, 190, 228) };
-			return new Palette(c, "plumbago", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* A freely available color scheme by Meghan Miller
-		 * http://soliton.vm.bytemark.co.uk/pub/cpt-city/cw/index.html
-		 * */
-		public static Palette cw1_013()
-		{
-			Color32[] c;
-			c = new[] { RGB(97, 65, 78), RGB(226, 87, 68), RGB(252, 255, 67), RGB(86, 118, 157), RGB(167, 214, 255) };
-			return new Palette(c, "cw1_013", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* A freely available color scheme from Arendal
-		 * http://soliton.vm.bytemark.co.uk/pub/cpt-city/arendal/copying.html
-		 * */
-		public static Palette arctic()
-		{
-			Color32[] c;
-			c = new[] { RGB(44, 53, 99), RGB(197, 197, 206), RGB(150, 210, 131), RGB(174, 223, 135), RGB(195, 230, 138), RGB(218, 237, 142), RGB(226, 233, 137), RGB(232, 217, 119), RGB(238, 200, 102), RGB(231, 183, 89), RGB(196, 167, 89), RGB(174, 158, 89) };
-			return new Palette(c, "arctic", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-		/* From the USGS Mercury MESSENGER topographic map
-		 * http://astrogeology.usgs.gov/search/map/Mercury/Topography/MESSENGER/Mercury-MESSENGER-DEM
-		 */
-		public static Palette mercury()
-		{
-			Color32[] c;
-			c = new[] { RGB(22, 22, 22), RGB(195, 130, 185), RGB(170, 120, 156), RGB(160, 120, 200), RGB(141, 96, 179), RGB(62, 30, 121), RGB(20, 0, 193), RGB(30, 50, 194), RGB(58, 102, 219), RGB(78, 135, 215), RGB(113, 196, 255), RGB(95, 210, 220), RGB(125, 213, 226), RGB(105, 188, 206), RGB(140, 185, 205), RGB(170, 181, 201), RGB(195, 203, 192), RGB(180, 205, 157), RGB(105, 195, 101), RGB(114, 171, 79), RGB(128, 156, 106), RGB(104, 106, 74), RGB(79, 46, 36), RGB(110, 71, 60), RGB(140, 94, 55), RGB(175, 137, 65), RGB(202, 166, 59), RGB(226, 211, 62), RGB(215, 136, 35), RGB(191, 75, 42), RGB(206, 20, 20), RGB(236, 75, 79), RGB(236, 178, 157), RGB(255, 255, 255) };
-			return new Palette(c, "mercury", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-
-		public static Palette venus()
-		{
-			Color32[] c;
-			c = new[] { RGB(93, 61, 126), RGB(52, 52, 152), RGB(81, 164, 168), RGB(54, 156, 51), RGB(197, 199, 94), RGB(153, 95, 66), RGB(166, 69, 69), RGB(183, 88, 154) };
-			return new Palette(c, "venus", Palette.Kind.Fixed, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3, (Palette.Is)3);
-		}
-
-	}
-}
diff --git a/SCANsat/SCAN_Platform/Palettes/Palette.cs b/SCANsat/SCAN_Platform/Palettes/Palette.cs
deleted file mode 100644
index 89ce1d0c6..000000000
--- a/SCANsat/SCAN_Platform/Palettes/Palette.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-#region license
-/* 
- * [Scientific Committee on Advanced Navigation]
- * 			S.C.A.N. Satellite
- *
- * SCAN Palette - object to hold information about a color palette
- * 
- * Copyright (c)2014 David Grandy ;
- * Copyright (c)2014 technogeeky ;
- * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
- */
-#endregion
-
-using System;
-using UnityEngine;
-
-namespace SCANsat.SCAN_Platform.Palettes
-{
-	//[Serializable]
-	public struct Palette
-	{
-		public string name;
-		public Kind kind;
-		public int size;
-		public int index;
-		public string hash;
-
-		public Color32[] colors;
-		public Color32[] colorsReverse;
-
-		public enum Kind {
-			Diverging,
-			Qualitative,
-			Sequential,
-			Fixed,
-			Invertable,
-			Unknown,
-		}
-
-		private static string[] getKindNames()
-		{
-			Kind[] v = (Kind[])Enum.GetValues(typeof(Kind));
-			string[] r = new string[v.Length - 2];
-			for (int i = 0; i < v.Length - 2; ++i)
-				r[i] = v[i].ToString();
-			return r;
-		}
-
-		public static string[] kindNames = getKindNames();
-
-		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 Palette(Color32[] cs, string name, Kind k, Is blindSafe, Is printSafe, Is xeroxSafe, Is panelSafe) {
-			this.colors = cs;
-			this.colorsReverse = new Color32[cs.Length];
-			this.colors.CopyTo(this.colorsReverse, 0);
-			Array.Reverse(this.colorsReverse);
-			this.name = name;
-			this.kind = k;
-			this.blind = blindSafe;
-			this.print = printSafe;
-			this.xerox = xeroxSafe;
-			this.panel = panelSafe;
-			this.size = cs.Length;
-			this.index = 0;
-			this.hash = name + size;
-		}
-	}
-
-}
-
diff --git a/SCANsat/SCAN_Platform/Palettes/PaletteLoader.cs b/SCANsat/SCAN_Platform/Palettes/PaletteLoader.cs
deleted file mode 100644
index 83be7eaf4..000000000
--- a/SCANsat/SCAN_Platform/Palettes/PaletteLoader.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-#region license
-/* 
- * [Scientific Committee on Advanced Navigation]
- * 			S.C.A.N. Satellite
- *
- * SCAN PaletteLoader - class for loading in color palette groups
- * 
- * Copyright (c)2014 David Grandy ;
- * Copyright (c)2014 technogeeky ;
- * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
- */
-#endregion
-
-using System.Collections.Generic;
-using UnityEngine;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
-
-namespace SCANsat.SCAN_Platform.Palettes
-{
-	static class PaletteLoader
-	{
-		internal static List palettes = new List();
-		internal static Palette defaultPalette = generateDefaultPalette();
-
-		private static Palette generateDefaultPalette()
-		{
-			Color32[] c;
-			c = new[] { (Color32)palette.xkcd_DarkPurple, (Color32)palette.xkcd_Cerulean, (Color32)palette.xkcd_ArmyGreen, (Color32)palette.xkcd_Yellow, (Color32)palette.xkcd_Red, (Color32)palette.xkcd_Magenta, (Color32)palette.xkcd_White };
-			return new Palette(c, "Default", Palette.Kind.Fixed, (Palette.Is)2, (Palette.Is)2, (Palette.Is)2, (Palette.Is)2);
-		}
-
-		internal static void generatePalettes(Palette.Kind Kind, int Size)
-		{
-			palettes.Clear();
-			if (Kind == Palette.Kind.Diverging)
-			{
-				palettes.Add(ColorBrewer.BrewerPalettes.Spectral(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.RdYlGn(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.RdBu(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.PiYG(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.PRGn(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.RdYlBu(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.BrBG(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.RdGy(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.PuOr(Size));
-			}
-			else if (Kind == Palette.Kind.Qualitative)
-			{
-				palettes.Add(ColorBrewer.BrewerPalettes.Set2(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Accent(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Set1(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Set3(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Dark2(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Paired(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Pastel2(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Pastel1(Size));
-
-			}
-			else if (Kind == Palette.Kind.Sequential)
-			{
-				palettes.Add(ColorBrewer.BrewerPalettes.OrRd(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.BuPu(Size));
-				//palettes.Add(ColorBrewer.BrewerPalettes.Oranges(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.BuGn(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.YlOrBr(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.YlGn(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Reds(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.RdPu(Size));
-				//palettes.Add(ColorBrewer.BrewerPalettes.Greens(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.YlGnBu(Size));
-				//palettes.Add(ColorBrewer.BrewerPalettes.Purples(Size));
-				//palettes.Add(ColorBrewer.BrewerPalettes.GnBu(Size));
-				//palettes.Add(ColorBrewer.BrewerPalettes.Greys(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.YlOrRd(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.PuRd(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.Blues(Size));
-				palettes.Add(ColorBrewer.BrewerPalettes.PuBuGn(Size));
-			}
-			else if (Kind == Palette.Kind.Fixed)
-			{
-				palettes.Add(defaultPalette);
-				palettes.Add(FixedColors.FixedColorPalettes.blackForest());
-				palettes.Add(FixedColors.FixedColorPalettes.mars());
-				palettes.Add(FixedColors.FixedColorPalettes.departure());
-				palettes.Add(FixedColors.FixedColorPalettes.northRhine());
-				palettes.Add(FixedColors.FixedColorPalettes.wiki2());
-				palettes.Add(FixedColors.FixedColorPalettes.plumbago());
-				palettes.Add(FixedColors.FixedColorPalettes.cw1_013());
-				palettes.Add(FixedColors.FixedColorPalettes.arctic());
-				palettes.Add(FixedColors.FixedColorPalettes.mercury());
-				palettes.Add(FixedColors.FixedColorPalettes.venus());
-			}
-		}
-	}
-}
diff --git a/SCANsat/SCAN_Platform/Palettes/Palettes.cs b/SCANsat/SCAN_Platform/Palettes/Palettes.cs
deleted file mode 100644
index 92a1bdc3f..000000000
--- a/SCANsat/SCAN_Platform/Palettes/Palettes.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-#region license
-/* 
- * [Scientific Committee on Advanced Navigation]
- * 			S.C.A.N. Satellite
- *
- * SCAN Palettes - class to hold a group of color palettes and information about them
- * 
- * Copyright (c)2014 David Grandy ;
- * Copyright (c)2014 technogeeky ;
- * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
- */
-#endregion
-
-using UnityEngine;
-
-namespace SCANsat.SCAN_Platform.Palettes
-{
-	public class _Palettes
-	{
-		internal Palette[] availablePalettes;
-		internal Palette.Kind paletteType;
-		internal Texture2D[] paletteSwatch;
-		internal int size;
-
-		internal int Length
-		{
-			get { return availablePalettes.Length; }
-		}
-
-		internal _Palettes (Palette[] p, Palette.Kind pK, int i)
-		{
-			availablePalettes = p;
-			int j = 0;
-			for (int d = 0; i < availablePalettes.Length; i++ )
-			{
-				availablePalettes[d].index = j;
-				j++;
-			}
-			paletteType = pK;
-			size = i;
-			generateSwatches();
-		}
-
-		private Texture2D[] generateSwatches()
-		{
-			if (paletteSwatch == null)
-			{
-				paletteSwatch = new Texture2D[availablePalettes.Length];
-				for (int i = 0; i < availablePalettes.Length; i++)
-				{
-					int k = 0;
-					int m = 120;
-					int paletteSize = availablePalettes[i].colors.Length;
-					if (paletteSize == 11) m = 121;
-					else if (paletteSize == 18) m = 126;
-					else if (paletteSize == 9) m = 117;
-					else if (paletteSize == 7) m = 119;
-					else if (paletteSize == 34) m = 136;
-					Texture2D t = new Texture2D(m, 1);
-					Color[] pix = t.GetPixels();
-					int sW = m / paletteSize;
-					for (int j = 0; j < m; j++)
-					{
-						if (j % sW == 0)
-							k++;
-						pix[j] = availablePalettes[i].colors[k-1];
-					}
-					t.SetPixels(pix);
-					t.Apply();
-					paletteSwatch[i] = t;
-				}
-				return paletteSwatch;
-			}
-			else
-				return paletteSwatch;
-		}
-	}
-}
-
diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs b/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs
deleted file mode 100644
index d84a53b98..000000000
--- a/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs
+++ /dev/null
@@ -1,352 +0,0 @@
-#region license
-/*
- * [Scientific Committee on Advanced Navigation]
- * 			S.C.A.N. Satellite
- * 
- * SCANpalette - manages colors and palettes of colors
- *
- * Copyright (c)2014 technogeeky ;
- * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
-*/
-#endregion
-
-using System;
-using UnityEngine;
-using SCANsat.SCAN_Data;
-using SCANsat.SCAN_Platform.Palettes;
-using SCANsat.SCAN_Platform.Palettes.ColorBrewer;
-
-namespace SCANsat.SCAN_UI.UI_Framework
-{
-	public class SCANpalette
-	{
-
-		// Basic Colors
-		// 	(these are here just so that all references to some color are the same throughout
-		//		SCANsat)
-		public static Color black 	= Color.black;
-		public static Color32 Black = (Color32)black;
-		public static Color white 	= Color.white;
-		public static Color32 White = (Color32)white;
-		public static Color red		= Color.red;
-		public static Color32 Red = (Color32)red;
-		public static Color grey		= Color.grey;
-		public static Color32 Grey = (Color32)grey;
-		public static Color clear	= Color.clear;
-		public static Color32 Clear = new Color32(0, 0, 0, 0);
-		public static Color magenta	= Color.magenta;
-		public static Color yellow	= Color.yellow;
-		public static Color cyan		= Color.cyan;
-		public static Color blue		= Color.blue;
-		public static Color green	= Color.green;
-		public static Color mechjebYellow = new Color(1.0f, 0.56f, 0.0f);
-
-		public static Color lerp (Color a, Color b, float t) {
-			return Color.Lerp (a,b,t);
-		}
-
-		public static Color32 lerp(Color32 a, Color32 b, float t)
-		{
-			return Color32.Lerp(a, b, t);
-		}
-
-		// XKCD Colors
-		// 	(these are collected here for the same reason)
-
-		public static Color xkcd_Amber		= XKCDColors.Amber;
-		public static Color xkcd_ArmyGreen		= XKCDColors.ArmyGreen;
-		public static Color xkcd_PukeGreen		= XKCDColors.PukeGreen;
-		public static Color xkcd_Lemon		= XKCDColors.Lemon;
-		public static Color xkcd_OrangeRed 	= XKCDColors.OrangeRed;
-		public static Color xkcd_CamoGreen		= XKCDColors.CamoGreen;
-		public static Color xkcd_Marigold		= XKCDColors.Marigold;
-		public static Color xkcd_Puce			= XKCDColors.Puce;
-		public static Color xkcd_DarkTeal 		= XKCDColors.DarkTeal;
-		public static Color xkcd_DarkPurple	= XKCDColors.DarkPurple;
-		public static Color xkcd_DarkGrey		= XKCDColors.DarkGrey;
-		public static Color xkcd_LightGrey		= XKCDColors.LightGrey;
-		public static Color xkcd_PurplyPink	= XKCDColors.PurplyPink;
-		public static Color xkcd_Magenta		= XKCDColors.Magenta;
-		public static Color xkcd_YellowGreen	= XKCDColors.YellowGreen;
-		public static Color xkcd_LightRed		= XKCDColors.LightRed;
-		public static Color xkcd_Cerulean		= XKCDColors.Cerulean;
-		public static Color xkcd_Yellow		= XKCDColors.Yellow;
-		public static Color xkcd_Red			= XKCDColors.Red;
-		public static Color xkcd_White		= XKCDColors.White;
-		public static Color xkcd_DarkGreenAlpha = XKCDColors.DarkGreen * new Vector4(1, 1, 1, 0.4f);
-
-
-		// colourblind barrier-free colours, according to Masataka Okabe and Kei Ito
-		// http://jfly.iam.u-tokyo.ac.jp/color/
-
-		public static Color cb_skyBlue 		= new Color(0.35f, 0.7f, 0.9f);		// sky blue
-		public static Color cb_bluishGreen 	= new Color(0f, 0.6f, 0.5f);		// bluish green
-		public static Color cb_yellow 		= new Color(0.95f, 0.9f, 0.25f);	// yellow
-		public static Color cb_blue 			= new Color(0f, 0.45f, 0.7f);		// blue
-		public static Color cb_vermillion 		= new Color(0.8f, 0.4f, 0f);		// vermillion
-		public static Color cb_reddishPurple	= new Color(0.8f, 0.6f, 0.7f);		// reddish purple
-		public static Color cb_orange 		= new Color(0.9f, 0.6f, 0f);		// orange
-
-		public static Color32 CB_skyBlue = (Color32)cb_skyBlue;
-		public static Color32 CB_bluishGreen = (Color32)cb_bluishGreen;
-		public static Color32 CB_yellow = (Color32)cb_yellow;
-		public static Color32 CB_blue = (Color32)cb_blue;
-		public static Color32 CB_vermillion = (Color32)cb_vermillion;
-		public static Color32 CB_reddishPurple = (Color32)cb_reddishPurple;
-		public static Color32 CB_orange = (Color32)cb_orange;
-
-		/* SOLARIZED colors: currently unused, so commented out */
-		/*
-		public static Color sol_base03 	= new Color32(0,43,54,255);
-		public static Color sol_base02 	= new Color32(7,54,66,255);
-		public static Color sol_base01 	= new Color32(88,110,117,255);
-		public static Color sol_base00 	= new Color32(101,123,131,255);
-		public static Color sol_base0 	= new Color32(131,148,150,255);
-		public static Color sol_base1 	= new Color32(147,161,161,255);
-		public static Color sol_base2 	= new Color32(238,232,213,255);
-		public static Color sol_base3 	= new Color32(253,246,227,255);
-		public static Color sol_yellow 	= new Color32(181,137,0,255);
-		public static Color sol_orange 	= new Color32(203,75,22,255);
-		public static Color sol_red 		= new Color32(45,220,50,255);
-		public static Color sol_magenta 	= new Color32(211,54,130,255);
-		public static Color sol_violet 	= new Color32(108,113,196,255);
-		public static Color sol_blue 		= new Color32(38,139,210,255);
-		public static Color sol_cyan 		= new Color32(42,161,152,255);
-		public static Color sol_green 	= new Color32(133,153,0,255);
-		*/
-		public static Color[] heightGradient = {
-			xkcd_ArmyGreen,
-			xkcd_Yellow,
-			xkcd_Red,
-			xkcd_Magenta,
-			xkcd_White,
-			xkcd_White
-		};
-
-		public static Color32[] redline;
-
-		public static Color32[] small_redline;
-
-		public static Color32 heightToColor(float val, bool color, SCANterrainConfig terrain, float min = 0, float max = 0, float range = 0, bool useCustomRange = false)
-		{
-			Color32[] c = terrain.ColorPal.colors;
-			if (terrain.PalRev)
-				c = terrain.ColorPal.colorsReverse;
-			if (useCustomRange)
-			{
-				if (color)
-					return heightToColor(val, max, min, range, terrain.ClampTerrain, terrain.PalDis, c, true);
-				else
-					return heightToColor(val, max, min, range, terrain.PalDis);
-			}
-			else
-			{
-				if (color)
-					return heightToColor(val, terrain.MaxTerrain, terrain.MinTerrain, terrain.TerrainRange, terrain.ClampTerrain, terrain.PalDis, c);
-				else
-					return heightToColor(val, terrain.MaxTerrain, terrain.MinTerrain, terrain.TerrainRange, terrain.PalDis);
-			}
-		}
-
-		private static Color32 heightToColor(float val, float max, float min, float range, bool discrete)
-		{
-			Color32 c = Black;
-			val -= min;
-			if (SCAN_Settings_Config.Instance.TrueGreyScale)
-			{
-				val = Mathf.Clamp(val, 0, range) / range;
-				c = lerp(Black, White, val);
-			}
-			else
-			{
-				if (discrete)
-				{
-					val = (greyScalePalette.colorsReverse.Length) * Mathf.Clamp(val, 0, range) / range;
-					if (Math.Floor(val) > greyScalePalette.colorsReverse.Length - 1)
-						val = greyScalePalette.colorsReverse.Length - 0.01f;
-					c = greyScalePalette.colorsReverse[(int)Math.Floor(val)];
-				}
-				else
-				{
-					val = (greyScalePalette.colorsReverse.Length - 1) * Mathf.Clamp(val, 0, range) / range;
-					if (Math.Floor(val) > greyScalePalette.colorsReverse.Length - 2)
-						val = greyScalePalette.colorsReverse.Length - 1.01f;
-					c = lerp(greyScalePalette.colorsReverse[(int)Math.Floor(val)], greyScalePalette.colorsReverse[(int)Math.Floor(val) + 1], val - (int)Math.Floor(val));
-				}
-			}
-			return c;
-		}
-
-		internal static Color32 heightToColor(float val, float max, float min, float range, float? clamp, bool discrete, Color32[] p, bool useCustomRange = false)
-		{
-			Color32 c = Black;
-			if (clamp != null)
-			{
-				if (!useCustomRange)
-				{
-					if (clamp < min + 10f)
-						clamp = min + 10f;
-					if (clamp > max - 10f)
-						clamp = max - 10f;
-				}
-
-				if (val <= (float)clamp)
-				{
-					float newRange;
-
-					if (useCustomRange)
-					{
-						if (max < (float)clamp)
-							newRange = max - min;
-						else
-							newRange = (float)clamp - min;
-					}
-					else
-						newRange = (float)clamp - min;
-
-					val -= min;
-
-					val = Mathf.Clamp(val, 0, newRange) / newRange;
-
-					if (discrete)
-						c = p[(int)Math.Round(val)];
-					else
-						c = lerp(p[0], p[1], val);
-				}
-				else
-				{
-					float newRange;
-
-					if (useCustomRange)
-					{
-						if (min > (float)clamp)
-						{
-							newRange = max - min;
-							val -= min;
-						}
-						else
-						{
-							newRange = max - (float)clamp;
-							val -= (float)clamp;
-						}
-					}
-					else
-					{
-						newRange = max - (float)clamp;
-						val -= (float)clamp;
-					}
-
-					if (discrete)
-					{
-						val = (p.Length - 2) * Mathf.Clamp(val, 0, newRange) / newRange;
-						if (Math.Floor(val) > p.Length - 3)
-							val = p.Length - 2.01f;
-						c = p[(int)Math.Floor(val) + 2];
-					}
-					else
-					{
-						val = (p.Length - 3) * Mathf.Clamp(val, 0, newRange) / newRange;
-						if (Math.Floor(val) > p.Length - 4)
-							val = p.Length - 3.01f;
-						c = lerp(p[(int)Math.Floor(val) + 2], p[(int)Math.Floor(val) + 3], val - (int)Math.Floor(val));
-					}
-				}
-			}
-			else
-			{
-				val -= min;
-				if (discrete)
-				{
-					val = (p.Length) * Mathf.Clamp(val, 0, range) / range;
-					if (Math.Floor(val) > p.Length - 1)
-						val = p.Length - 0.01f;
-					c = p[(int)Math.Floor(val)];
-				}
-				else
-				{
-					val = (p.Length - 1) * Mathf.Clamp(val, 0, range) / range;
-					if (Math.Floor(val) > p.Length - 2)
-						val = p.Length - 1.01f;
-					c = lerp(p[(int)Math.Floor(val)], p[(int)Math.Floor(val) + 1], val - (int)Math.Floor(val));
-				}
-			}
-			return c;
-		}
-
-		public static string colorHex ( Color32 c ) {
-			return string.Format("#{0:X2}{1:X2}{2:X2}", c.r, c.g, c.b);
-		}
-		public static string coloredNoQuote(Color c, string text)
-		{
-			return string.Format("{1}", colorHex(c), text);
-		}
-
-		internal static Color c_good
-		{
-			get
-			{
-				if (SCANcontroller.controller.mainMapColor)
-					return cb_bluishGreen;
-				else
-					return cb_skyBlue;
-			}
-		}
-		internal static Color c_bad
-		{
-			get
-			{
-				return cb_orange;
-			}
-		}
-		internal static Color c_ugly {
-			get
-			{
-				if (SCANcontroller.controller.mainMapColor)
-					return xkcd_LightRed;
-				else
-					return cb_yellow;
-			}
-		}
-
-		private static _Palettes currentPaletteSet;
-		private static Palette greyScalePalette = BrewerPalettes.Greys(9);
-
-		private static _Palettes generatePaletteSet(int size, Palette.Kind type)
-		{
-			PaletteLoader.generatePalettes(type, size);
-			return new _Palettes(PaletteLoader.palettes.ToArray(), type, size);
-		}
-
-		internal static _Palettes setCurrentPalettesType(Palette.Kind type, int size)
-		{
-			switch (type)
-			{
-				case Palette.Kind.Fixed:
-					return generatePaletteSet(0, Palette.Kind.Fixed);
-				default:
-					return generatePaletteSet(size, type);
-			}
-		}
-
-		public static Palette GreyScalePalette
-		{
-			get { return greyScalePalette; }
-		}
-
-		public static _Palettes CurrentPalettes
-		{
-			get { return currentPaletteSet; }
-			internal set
-			{
-				currentPaletteSet = value;
-			}
-		}
-
-		public static string getPaletteTypeName
-		{
-			get { return currentPaletteSet.paletteType.ToString(); }
-		}
-
-	}
-}
-

From b985d43e66e4c8985db220347ed1980447f7db8e Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:44:39 -0400
Subject: [PATCH 04/29] New files

---
 SCANsat/SCANsat.csproj | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/SCANsat/SCANsat.csproj b/SCANsat/SCANsat.csproj
index 1145d420b..f6c2ced67 100644
--- a/SCANsat/SCANsat.csproj
+++ b/SCANsat/SCANsat.csproj
@@ -51,6 +51,10 @@
     
     
     
+    
+    
+    
+    
     
     
     
@@ -62,6 +66,7 @@
     
     
     
+    
     
     
     
@@ -75,12 +80,9 @@
     
     
     
-    
-    
-    
-    
-    
-    
+    
+    
+    
     
     
     
@@ -91,7 +93,7 @@
     
     
     
-    
+    
     
     
     
@@ -145,4 +147,5 @@
       SCANsat.Unity
     
   
+  
 
\ No newline at end of file

From bceb3bf3b17f1d34e630805a91c05aa75ec0c463 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:45:56 -0400
Subject: [PATCH 05/29] Fix celestial body lists

---
 SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs   | 15 ++++++++-------
 SCANsat/SCAN_Unity/SCAN_UI_Settings.cs |  5 +++--
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs
index 0e9fbbd9c..ad1c2415d 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs
@@ -29,7 +29,7 @@
 using KSP.Localization;
 using FinePrint;
 using FinePrint.Utilities;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat.SCAN_Unity
 {
@@ -1561,7 +1561,7 @@ public IList CelestialBodies
 			{
 				List bodyList = new List();
 
-				var bodies = SCANcontroller.controller.GetAllData.Select(d => d.Body).Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b);
+				var bodies = FlightGlobals.Bodies.Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b);
 
 				var orderedBodies = bodies.OrderBy(b => b.orbit.semiMajorAxis).ToList();
 
@@ -1569,12 +1569,13 @@ public IList CelestialBodies
 				{
 					CelestialBody body = orderedBodies[i];
 
-					bodyList.Add(body.displayName.LocalizeBodyName());
-					//SCANUtil.SCANlog("Body: {0} - Orbiting Count: {1}", body.bodyName, body.orbitingBodies.Count);
+					if (SCANcontroller.controller.getData(body.bodyName) != null)
+						bodyList.Add(body.displayName.LocalizeBodyName());
+					SCANUtil.SCANlog("Body: {0} - Orbiting Count: {1}", body.bodyName, body.orbitingBodies.Count);
 					for (int j = 0; j < body.orbitingBodies.Count; j++)
 					{
 						CelestialBody moon = body.orbitingBodies[j];
-						//SCANUtil.SCANlog("Moon: {0} - Orbiting Count: {1}", moon.bodyName, moon.orbitingBodies.Count);
+						SCANUtil.SCANlog("Moon: {0} - Orbiting Count: {1}", moon.bodyName, moon.orbitingBodies.Count);
 
 						if (SCANcontroller.controller.getData(moon.bodyName) != null)
 							bodyList.Add(moon.displayName.LocalizeBodyName());
@@ -1582,7 +1583,7 @@ public IList CelestialBodies
 						for (int k = 0; k < moon.orbitingBodies.Count; k++)
 						{
 							CelestialBody subMoon = moon.orbitingBodies[k];
-							//SCANUtil.SCANlog("Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count);
+							SCANUtil.SCANlog("Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count);
 
 							if (SCANcontroller.controller.getData(subMoon.bodyName) != null)
 								bodyList.Add(subMoon.displayName.LocalizeBodyName());
@@ -1590,7 +1591,7 @@ public IList CelestialBodies
 							for (int l = 0; l < subMoon.orbitingBodies.Count; l++)
 							{
 								CelestialBody subSubMoon = subMoon.orbitingBodies[l];
-								//SCANUtil.SCANlog("Sub Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count);
+								SCANUtil.SCANlog("Sub Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count);
 
 								if (SCANcontroller.controller.getData(subSubMoon.bodyName) != null)
 									bodyList.Add(subSubMoon.displayName.LocalizeBodyName());
diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs b/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs
index 81ae69038..4b8c7e671 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs
@@ -581,7 +581,7 @@ public IList BackgroundBodies
 			{
 				List bodyList = new List();
 
-				var bodies = SCANcontroller.controller.GetAllData.Select(d => d.Body).Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b);
+				var bodies = FlightGlobals.Bodies.Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b);
 
 				var orderedBodies = bodies.OrderBy(b => b.orbit.semiMajorAxis).ToList();
 
@@ -589,7 +589,8 @@ public IList BackgroundBodies
 				{
 					CelestialBody body = orderedBodies[i];
 
-					bodyList.Add(body.displayName.LocalizeBodyName());
+					if (SCANcontroller.controller.getData(body.bodyName) != null)
+						bodyList.Add(body.displayName.LocalizeBodyName());
 
 					for (int j = 0; j < body.orbitingBodies.Count; j++)
 					{

From 3a99b46d2e7d8bc3fcea43da640f705558f5e036 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:46:14 -0400
Subject: [PATCH 06/29] Using reference

---
 SCANsat/SCAN_PartModules/SCANsat.cs      | 2 +-
 SCANsat/SCAN_UI/UI_Framework/SCANicon.cs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/SCANsat/SCAN_PartModules/SCANsat.cs b/SCANsat/SCAN_PartModules/SCANsat.cs
index 06ddf2a62..9bedeba68 100644
--- a/SCANsat/SCAN_PartModules/SCANsat.cs
+++ b/SCANsat/SCAN_PartModules/SCANsat.cs
@@ -21,7 +21,7 @@
 using KSP.Localization;
 
 using UnityEngine;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat.SCAN_PartModules
 {
diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs b/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs
index 3bac76a62..5b7cdd629 100644
--- a/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs
+++ b/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs
@@ -17,7 +17,7 @@
 using System.Reflection;
 using UnityEngine;
 
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 using Log = SCANsat.SCAN_Platform.Logging.ConsoleLogger;
 
 namespace SCANsat.SCAN_UI.UI_Framework

From 23f5f29e1a644ea27392dd9eb5ddc5366f894daa Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:46:37 -0400
Subject: [PATCH 07/29] Unused code; using references; update to new palette
 system

---
 SCANsat/SCAN_Unity/SCAN_UI_Loader.cs | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs b/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs
index 9546d113f..c47833de4 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs
@@ -16,14 +16,15 @@
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.UI;
+using SCANsat.SCAN_Data;
 using SCANsat.Unity;
 using SCANsat.Unity.Unity;
-using SCANsat.SCAN_Platform.Palettes;
+using SCANsat.SCAN_Palettes;
 using KSP.UI;
 using KSP.UI.Screens;
 using KSP.Localization;
 using TMPro;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat.SCAN_Unity
 {
@@ -363,8 +364,8 @@ private IEnumerator loadResources()
 
 			if (!prefabsLoaded)
 				loadPrefabBundle();
-
-			palette.CurrentPalettes = palette.setCurrentPalettesType(Palette.Kind.Diverging, 7);
+			
+			palette.CurrentPalettes = palette.SetCurrentPalettesType(SCANPaletteKind.Diverging);
 
 			if (shadersLoaded && spritesLoaded && skinLoaded && iconsLoaded && prefabsLoaded)
 				SCANUtil.SCANlog("All SCANsat asset bundles loaded");
@@ -697,21 +698,6 @@ private static void loadPrefabBundle()
 
 		private static void processTMPPrefabs()
 		{
-			//foreach (var r in Resources.FindObjectsOfTypeAll())
-			//{
-			//	SCANUtil.SCANlog("Material: {0}", r.name);
-			//}
-
-			//foreach (var f in Resources.FindObjectsOfTypeAll())
-			//{
-			//	SCANUtil.SCANlog("TMP Font: {0}", f.name);
-			//}
-
-			//foreach (var f in Resources.FindObjectsOfTypeAll())
-			//{
-			//	SCANUtil.SCANlog("Font: {0}", f.name);
-			//}
-
 			for (int i = loadedPrefabs.Length - 1; i >= 0; i--)
 			{
 				GameObject o = loadedPrefabs[i];

From 80b6ab88f490b9b0156fd1d74b65f3346ba300fc Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:46:47 -0400
Subject: [PATCH 08/29] Show full exception

---
 SCANsat/SCAN_Platform/SCAN_ConfigNodeStorage.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SCANsat/SCAN_Platform/SCAN_ConfigNodeStorage.cs b/SCANsat/SCAN_Platform/SCAN_ConfigNodeStorage.cs
index 65b3ca0eb..222f4b84b 100644
--- a/SCANsat/SCAN_Platform/SCAN_ConfigNodeStorage.cs
+++ b/SCANsat/SCAN_Platform/SCAN_ConfigNodeStorage.cs
@@ -56,7 +56,7 @@ public bool Load(string fileFullName)
 			}
 			catch (Exception ex)
 			{
-				Log.Now("Failed to Load ConfigNode from file ({0}) - Error:{1}", fileFullName, ex.Message);
+				Log.Now("Failed to Load ConfigNode from file ({0}) - Error:{1}", fileFullName, ex);
 				Log.Now("Storing old config - {0}", fileFullName + ".err-" + timeNow);
 				System.IO.File.Copy(fileFullName, fileFullName + ".err-" + timeNow, true);
 				return false;

From 59057574b45b66a7df9f8aeb6cc1359dce416ef5 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:46:58 -0400
Subject: [PATCH 09/29] Move these files

---
 SCANsat/SCAN_Palettes/ColorBrewer.cs        | 645 ++++++++++++++++++++
 SCANsat/SCAN_Palettes/FixedColorPalettes.cs | 121 ++++
 2 files changed, 766 insertions(+)
 create mode 100644 SCANsat/SCAN_Palettes/ColorBrewer.cs
 create mode 100644 SCANsat/SCAN_Palettes/FixedColorPalettes.cs

diff --git a/SCANsat/SCAN_Palettes/ColorBrewer.cs b/SCANsat/SCAN_Palettes/ColorBrewer.cs
new file mode 100644
index 000000000..65d7b569f
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/ColorBrewer.cs
@@ -0,0 +1,645 @@
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCAN ColorBrewer - static class for generating Color Brewer color SCANPalettes
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
+using UnityEngine;
+using SCANsat.SCAN_Data;
+
+namespace SCANsat.SCAN_Palettes
+{
+	public static class BrewerPalettes {
+		static Func RGB = (r,g,b) => new Color32(r,g,b,255);
+
+		/*** Diverging ***/
+		public static SCANPalette Spectral (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(252,141,089), RGB(255,255,191), RGB(153,213,148)}; break;
+			case 04: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(171,221,164), RGB(043,131,186)}; break;
+			case 05: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(255,255,191), RGB(171,221,164), RGB(043,131,186)}; break;
+			case 06: c = new[] {RGB(213,062,079), RGB(252,141,089), RGB(254,224,139), RGB(230,245,152), RGB(153,213,148), RGB(050,136,189)}; break;
+			case 07: c = new[] {RGB(213,062,079), RGB(252,141,089), RGB(254,224,139), RGB(255,255,191), RGB(230,245,152), RGB(153,213,148), RGB(050,136,189)}; break;
+			case 08: c = new[] {RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189)}; break;
+			case 09: c = new[] {RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(255,255,191), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189)}; break;
+			case 10: c = new[] {RGB(158,001,066), RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189), RGB(094,079,162)}; break;
+			default: c = new[] {RGB(158,001,066), RGB(213,062,079), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(255,255,191), RGB(230,245,152), RGB(171,221,164), RGB(102,194,165), RGB(050,136,189), RGB(094,079,162)}; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+			return new SCANPalette(c, "Spectral", @type, c.Length);
+
+		}
+		public static SCANPalette RdYlGn (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(252,141,089), RGB(255,255,191), RGB(145,207,096)}; break;
+			case 04: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(166,217,106), RGB(026,150,065)}; break;
+			case 05: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(255,255,191), RGB(166,217,106), RGB(026,150,065)}; break;
+			case 06: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,139), RGB(217,239,139), RGB(145,207,096), RGB(026,152,080)}; break;
+			case 07: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,139), RGB(255,255,191), RGB(217,239,139), RGB(145,207,096), RGB(026,152,080)}; break;
+			case 08: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(217,239,139), RGB(166,217,106), RGB(102,189,099), RGB(026,152,080)}; break;
+			case 09: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(255,255,191), RGB(217,239,139), RGB(166,217,106), RGB(102,189,099), RGB(026,152,080)}; break;
+			case 10: c = new[] {RGB(165,000,038), RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,139), RGB(217,239,139), RGB(166,217,106), RGB(102,189,099), RGB(026,152,080), RGB(000,104,055)}; break;
+			default: c = new[] { RGB(165, 000, 038), RGB(215, 048, 039), RGB(244, 109, 067), RGB(253, 174, 097), RGB(254, 224, 139), RGB(255, 255, 191), RGB(217, 239, 139), RGB(166, 217, 106), RGB(102, 189, 099), RGB(026, 152, 080), RGB(000, 104, 055) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "RdYlGn", @type, c.Length);
+
+		}
+		public static SCANPalette RdBu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(239,138,098), RGB(247,247,247), RGB(103,169,207)}; break;
+			case 04: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(146,197,222), RGB(005,113,176)}; break;
+			case 05: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(247,247,247), RGB(146,197,222), RGB(005,113,176)}; break;
+			case 06: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(209,229,240), RGB(103,169,207), RGB(033,102,172)}; break;
+			case 07: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(247,247,247), RGB(209,229,240), RGB(103,169,207), RGB(033,102,172)}; break;
+			case 08: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(209,229,240), RGB(146,197,222), RGB(067,147,195), RGB(033,102,172)}; break;
+			case 09: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(247,247,247), RGB(209,229,240), RGB(146,197,222), RGB(067,147,195), RGB(033,102,172)}; break;
+			case 10: c = new[] {RGB(103,000,031), RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(209,229,240), RGB(146,197,222), RGB(067,147,195), RGB(033,102,172), RGB(005,048,097)}; break;
+			default: c = new[] { RGB(103, 000, 031), RGB(178, 024, 043), RGB(214, 096, 077), RGB(244, 165, 130), RGB(253, 219, 199), RGB(247, 247, 247), RGB(209, 229, 240), RGB(146, 197, 222), RGB(067, 147, 195), RGB(033, 102, 172), RGB(005, 048, 097) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "RdBu", @type, c.Length);
+
+		}
+		public static SCANPalette PiYG (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(233,163,201), RGB(247,247,247), RGB(161,215,106)}; break;
+			case 04: c = new[] {RGB(208,028,139), RGB(241,182,218), RGB(184,225,134), RGB(077,172,038)}; break;
+			case 05: c = new[] {RGB(208,028,139), RGB(241,182,218), RGB(247,247,247), RGB(184,225,134), RGB(077,172,038)}; break;
+			case 06: c = new[] {RGB(197,027,125), RGB(233,163,201), RGB(253,224,239), RGB(230,245,208), RGB(161,215,106), RGB(077,146,033)}; break;
+			case 07: c = new[] {RGB(197,027,125), RGB(233,163,201), RGB(253,224,239), RGB(247,247,247), RGB(230,245,208), RGB(161,215,106), RGB(077,146,033)}; break;
+			case 08: c = new[] {RGB(197,027,125), RGB(222,119,174), RGB(241,182,218), RGB(253,224,239), RGB(230,245,208), RGB(184,225,134), RGB(127,188,065), RGB(077,146,033)}; break;
+			case 09: c = new[] {RGB(197,027,125), RGB(222,119,174), RGB(241,182,218), RGB(253,224,239), RGB(247,247,247), RGB(230,245,208), RGB(184,225,134), RGB(127,188,065), RGB(077,146,033)}; break;
+			case 10: c = new[] {RGB(142,001,082), RGB(197,027,125), RGB(222,119,174), RGB(241,182,218), RGB(253,224,239), RGB(230,245,208), RGB(184,225,134), RGB(127,188,065), RGB(077,146,033), RGB(039,100,025)}; break;
+			default: c = new[] { RGB(142, 001, 082), RGB(197, 027, 125), RGB(222, 119, 174), RGB(241, 182, 218), RGB(253, 224, 239), RGB(247, 247, 247), RGB(230, 245, 208), RGB(184, 225, 134), RGB(127, 188, 065), RGB(077, 146, 033), RGB(039, 100, 025) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "PiYG", @type, c.Length);
+
+		}
+		public static SCANPalette PRGn (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(175,141,195), RGB(247,247,247), RGB(127,191,123)}; break;
+			case 04: c = new[] {RGB(123,050,148), RGB(194,165,207), RGB(166,219,160), RGB(000,136,055)}; break;
+			case 05: c = new[] {RGB(123,050,148), RGB(194,165,207), RGB(247,247,247), RGB(166,219,160), RGB(000,136,055)}; break;
+			case 06: c = new[] {RGB(118,042,131), RGB(175,141,195), RGB(231,212,232), RGB(217,240,211), RGB(127,191,123), RGB(027,120,055)}; break;
+			case 07: c = new[] {RGB(118,042,131), RGB(175,141,195), RGB(231,212,232), RGB(247,247,247), RGB(217,240,211), RGB(127,191,123), RGB(027,120,055)}; break;
+			case 08: c = new[] {RGB(118,042,131), RGB(153,112,171), RGB(194,165,207), RGB(231,212,232), RGB(217,240,211), RGB(166,219,160), RGB(090,174,097), RGB(027,120,055)}; break;
+			case 09: c = new[] {RGB(118,042,131), RGB(153,112,171), RGB(194,165,207), RGB(231,212,232), RGB(247,247,247), RGB(217,240,211), RGB(166,219,160), RGB(090,174,097), RGB(027,120,055)}; break;
+			case 10: c = new[] {RGB(064,000,075), RGB(118,042,131), RGB(153,112,171), RGB(194,165,207), RGB(231,212,232), RGB(217,240,211), RGB(166,219,160), RGB(090,174,097), RGB(027,120,055), RGB(000,068,027)}; break;
+			default: c = new[] { RGB(064, 000, 075), RGB(118, 042, 131), RGB(153, 112, 171), RGB(194, 165, 207), RGB(231, 212, 232), RGB(247, 247, 247), RGB(217, 240, 211), RGB(166, 219, 160), RGB(090, 174, 097), RGB(027, 120, 055), RGB(000, 068, 027) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "PRGn", @type, c.Length);
+
+		}
+		public static SCANPalette RdYlBu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(252,141,089), RGB(255,255,191), RGB(145,191,219)}; break;
+			case 04: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(171,217,233), RGB(044,123,182)}; break;
+			case 05: c = new[] {RGB(215,025,028), RGB(253,174,097), RGB(255,255,191), RGB(171,217,233), RGB(044,123,182)}; break;
+			case 06: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,144), RGB(224,243,248), RGB(145,191,219), RGB(069,117,180)}; break;
+			case 07: c = new[] {RGB(215,048,039), RGB(252,141,089), RGB(254,224,144), RGB(255,255,191), RGB(224,243,248), RGB(145,191,219), RGB(069,117,180)}; break;
+			case 08: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,144), RGB(224,243,248), RGB(171,217,233), RGB(116,173,209), RGB(069,117,180)}; break;
+			case 09: c = new[] {RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,144), RGB(255,255,191), RGB(224,243,248), RGB(171,217,233), RGB(116,173,209), RGB(069,117,180)}; break;
+			case 10: c = new[] {RGB(165,000,038), RGB(215,048,039), RGB(244,109,067), RGB(253,174,097), RGB(254,224,144), RGB(224,243,248), RGB(171,217,233), RGB(116,173,209), RGB(069,117,180), RGB(049,054,149)}; break;
+			default: c = new[] { RGB(165, 000, 038), RGB(215, 048, 039), RGB(244, 109, 067), RGB(253, 174, 097), RGB(254, 224, 144), RGB(255, 255, 191), RGB(224, 243, 248), RGB(171, 217, 233), RGB(116, 173, 209), RGB(069, 117, 180), RGB(049, 054, 149) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "RdYlBu", @type, c.Length);
+
+		}
+		public static SCANPalette BrBG (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(216,179,101), RGB(245,245,245), RGB(090,180,172)}; break;
+			case 04: c = new[] {RGB(166,097,026), RGB(223,194,125), RGB(128,205,193), RGB(001,133,113)}; break;
+			case 05: c = new[] {RGB(166,097,026), RGB(223,194,125), RGB(245,245,245), RGB(128,205,193), RGB(001,133,113)}; break;
+			case 06: c = new[] {RGB(140,081,010), RGB(216,179,101), RGB(246,232,195), RGB(199,234,229), RGB(090,180,172), RGB(001,102,094)}; break;
+			case 07: c = new[] {RGB(140,081,010), RGB(216,179,101), RGB(246,232,195), RGB(245,245,245), RGB(199,234,229), RGB(090,180,172), RGB(001,102,094)}; break;
+			case 08: c = new[] {RGB(140,081,010), RGB(191,129,045), RGB(223,194,125), RGB(246,232,195), RGB(199,234,229), RGB(128,205,193), RGB(053,151,143), RGB(001,102,094)}; break;
+			case 09: c = new[] {RGB(140,081,010), RGB(191,129,045), RGB(223,194,125), RGB(246,232,195), RGB(245,245,245), RGB(199,234,229), RGB(128,205,193), RGB(053,151,143), RGB(001,102,094)}; break;
+			case 10: c = new[] {RGB(084,048,005), RGB(140,081,010), RGB(191,129,045), RGB(223,194,125), RGB(246,232,195), RGB(199,234,229), RGB(128,205,193), RGB(053,151,143), RGB(001,102,094), RGB(000,060,048)}; break;
+			default: c = new[] { RGB(084, 048, 005), RGB(140, 081, 010), RGB(191, 129, 045), RGB(223, 194, 125), RGB(246, 232, 195), RGB(245, 245, 245), RGB(199, 234, 229), RGB(128, 205, 193), RGB(053, 151, 143), RGB(001, 102, 094), RGB(000, 060, 048) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "BrBG", @type, c.Length);
+
+		}
+		public static SCANPalette RdGy (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(239,138,098), RGB(255,255,255), RGB(153,153,153)}; break;
+			case 04: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(186,186,186), RGB(064,064,064)}; break;
+			case 05: c = new[] {RGB(202,000,032), RGB(244,165,130), RGB(255,255,255), RGB(186,186,186), RGB(064,064,064)}; break;
+			case 06: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(224,224,224), RGB(153,153,153), RGB(077,077,077)}; break;
+			case 07: c = new[] {RGB(178,024,043), RGB(239,138,098), RGB(253,219,199), RGB(255,255,255), RGB(224,224,224), RGB(153,153,153), RGB(077,077,077)}; break;
+			case 08: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(224,224,224), RGB(186,186,186), RGB(135,135,135), RGB(077,077,077)}; break;
+			case 09: c = new[] {RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(255,255,255), RGB(224,224,224), RGB(186,186,186), RGB(135,135,135), RGB(077,077,077)}; break;
+			case 10: c = new[] {RGB(103,000,031), RGB(178,024,043), RGB(214,096,077), RGB(244,165,130), RGB(253,219,199), RGB(224,224,224), RGB(186,186,186), RGB(135,135,135), RGB(077,077,077), RGB(026,026,026)}; break;
+			default: c = new[] { RGB(103, 000, 031), RGB(178, 024, 043), RGB(214, 096, 077), RGB(244, 165, 130), RGB(253, 219, 199), RGB(255, 255, 255), RGB(224, 224, 224), RGB(186, 186, 186), RGB(135, 135, 135), RGB(077, 077, 077), RGB(026, 026, 026) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "RdGy", @type, c.Length);
+
+		}
+		public static SCANPalette PuOr (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(241,163,064), RGB(247,247,247), RGB(153,142,195)}; break;
+			case 04: c = new[] {RGB(230,097,001), RGB(253,184,099), RGB(178,171,210), RGB(094,060,153)}; break;
+			case 05: c = new[] {RGB(230,097,001), RGB(253,184,099), RGB(247,247,247), RGB(178,171,210), RGB(094,060,153)}; break;
+			case 06: c = new[] {RGB(179,088,006), RGB(241,163,064), RGB(254,224,182), RGB(216,218,235), RGB(153,142,195), RGB(084,039,136)}; break;
+			case 07: c = new[] {RGB(179,088,006), RGB(241,163,064), RGB(254,224,182), RGB(247,247,247), RGB(216,218,235), RGB(153,142,195), RGB(084,039,136)}; break;
+			case 08: c = new[] {RGB(179,088,006), RGB(224,130,020), RGB(253,184,099), RGB(254,224,182), RGB(216,218,235), RGB(178,171,210), RGB(128,115,172), RGB(084,039,136)}; break;
+			case 09: c = new[] {RGB(179,088,006), RGB(224,130,020), RGB(253,184,099), RGB(254,224,182), RGB(247,247,247), RGB(216,218,235), RGB(178,171,210), RGB(128,115,172), RGB(084,039,136)}; break;
+			case 10: c = new[] {RGB(127,059,008), RGB(179,088,006), RGB(224,130,020), RGB(253,184,099), RGB(254,224,182), RGB(216,218,235), RGB(178,171,210), RGB(128,115,172), RGB(084,039,136), RGB(045,000,075)}; break;
+			default: c = new[] { RGB(127, 059, 008), RGB(179, 088, 006), RGB(224, 130, 020), RGB(253, 184, 099), RGB(254, 224, 182), RGB(247, 247, 247), RGB(216, 218, 235), RGB(178, 171, 210), RGB(128, 115, 172), RGB(084, 039, 136), RGB(045, 000, 075) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Diverging;
+
+			return new SCANPalette(c, "PuOr", @type, c.Length);
+
+		}
+		/*** Qualitative ***/
+		public static SCANPalette Set2 (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203)}; break;
+			case 04: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195)}; break;
+			case 05: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195), RGB(166,216,084)}; break;
+			case 06: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195), RGB(166,216,084), RGB(255,217,047)}; break;
+			case 07: c = new[] {RGB(102,194,165), RGB(252,141,098), RGB(141,160,203), RGB(231,138,195), RGB(166,216,084), RGB(255,217,047), RGB(229,196,148)}; break;
+			default: c = new[] { RGB(102, 194, 165), RGB(252, 141, 098), RGB(141, 160, 203), RGB(231, 138, 195), RGB(166, 216, 084), RGB(255, 217, 047), RGB(229, 196, 148), RGB(179, 179, 179) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Set2", @type, c.Length);
+
+		}
+		public static SCANPalette Accent (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134)}; break;
+			case 04: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153)}; break;
+			case 05: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153), RGB(056,108,176)}; break;
+			case 06: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153), RGB(056,108,176), RGB(240,002,127)}; break;
+			case 07: c = new[] {RGB(127,201,127), RGB(190,174,212), RGB(253,192,134), RGB(255,255,153), RGB(056,108,176), RGB(240,002,127), RGB(191,091,023)}; break;
+			default: c = new[] { RGB(127, 201, 127), RGB(190, 174, 212), RGB(253, 192, 134), RGB(255, 255, 153), RGB(056, 108, 176), RGB(240, 002, 127), RGB(191, 091, 023), RGB(102, 102, 102) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Accent", @type, c.Length);
+
+		}
+		public static SCANPalette Set1 (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074)}; break;
+			case 04: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163)}; break;
+			case 05: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000)}; break;
+			case 06: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000), RGB(255,255,051)}; break;
+			case 07: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000), RGB(255,255,051), RGB(166,086,040)}; break;
+			case 08: c = new[] {RGB(228,026,028), RGB(055,126,184), RGB(077,175,074), RGB(152,078,163), RGB(255,127,000), RGB(255,255,051), RGB(166,086,040), RGB(247,129,191)}; break;
+			default: c = new[] { RGB(228, 026, 028), RGB(055, 126, 184), RGB(077, 175, 074), RGB(152, 078, 163), RGB(255, 127, 000), RGB(255, 255, 051), RGB(166, 086, 040), RGB(247, 129, 191), RGB(153, 153, 153) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Set1", @type, c.Length);
+
+		}
+		public static SCANPalette Set3 (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218)}; break;
+			case 04: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114)}; break;
+			case 05: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211)}; break;
+			case 06: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098)}; break;
+			case 07: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105)}; break;
+			case 08: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229)}; break;
+			case 09: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229), RGB(217,217,217)}; break;
+			case 10: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229), RGB(217,217,217), RGB(188,128,189)}; break;
+			case 11: c = new[] {RGB(141,211,199), RGB(255,255,179), RGB(190,186,218), RGB(251,128,114), RGB(128,177,211), RGB(253,180,098), RGB(179,222,105), RGB(252,205,229), RGB(217,217,217), RGB(188,128,189), RGB(204,235,197)}; break;
+			default: c = new[] { RGB(141, 211, 199), RGB(255, 255, 179), RGB(190, 186, 218), RGB(251, 128, 114), RGB(128, 177, 211), RGB(253, 180, 098), RGB(179, 222, 105), RGB(252, 205, 229), RGB(217, 217, 217), RGB(188, 128, 189), RGB(204, 235, 197), RGB(255, 237, 111) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Set3", @type, c.Length);
+
+		}
+		public static SCANPalette Dark2 (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179)}; break;
+			case 04: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138)}; break;
+			case 05: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138), RGB(102,166,030)}; break;
+			case 06: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138), RGB(102,166,030), RGB(230,171,002)}; break;
+			case 07: c = new[] {RGB(027,158,119), RGB(217,095,002), RGB(117,112,179), RGB(231,041,138), RGB(102,166,030), RGB(230,171,002), RGB(166,118,029)}; break;
+			default: c = new[] { RGB(027, 158, 119), RGB(217, 095, 002), RGB(117, 112, 179), RGB(231, 041, 138), RGB(102, 166, 030), RGB(230, 171, 002), RGB(166, 118, 029), RGB(102, 102, 102) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Dark2", @type, c.Length);
+
+		}
+		public static SCANPalette Paired (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138)}; break;
+			case 04: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044)}; break;
+			case 05: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153)}; break;
+			case 06: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028)}; break;
+			case 07: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111)}; break;
+			case 08: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000)}; break;
+			case 09: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214)}; break;
+			case 10: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214), RGB(106,061,154)}; break;
+			case 11: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214), RGB(106,061,154), RGB(255,255,153)}; break;
+			default: c = new[] {RGB(166,206,227), RGB(031,120,180), RGB(178,223,138), RGB(051,160,044), RGB(251,154,153), RGB(227,026,028), RGB(253,191,111), RGB(255,127,000), RGB(202,178,214), RGB(106,061,154), RGB(255,255,153), RGB(177,089,040)}; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Paired", @type, c.Length);
+
+		}
+		public static SCANPalette Pastel2 (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232)}; break;
+			case 04: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228)}; break;
+			case 05: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228), RGB(230,245,201)}; break;
+			case 06: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228), RGB(230,245,201), RGB(255,242,174)}; break;
+			case 07: c = new[] {RGB(179,226,205), RGB(253,205,172), RGB(203,213,232), RGB(244,202,228), RGB(230,245,201), RGB(255,242,174), RGB(241,226,204)}; break;
+			default: c = new[] { RGB(179, 226, 205), RGB(253, 205, 172), RGB(203, 213, 232), RGB(244, 202, 228), RGB(230, 245, 201), RGB(255, 242, 174), RGB(241, 226, 204), RGB(204, 204, 204) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Pastel2", @type, c.Length);
+
+		}
+		public static SCANPalette Pastel1 (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197)}; break;
+			case 04: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228)}; break;
+			case 05: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166)}; break;
+			case 06: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166), RGB(255,255,204)}; break;
+			case 07: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166), RGB(255,255,204), RGB(229,216,189)}; break;
+			case 08: c = new[] {RGB(251,180,174), RGB(179,205,227), RGB(204,235,197), RGB(222,203,228), RGB(254,217,166), RGB(255,255,204), RGB(229,216,189), RGB(253,218,236)}; break;
+			default: c = new[] { RGB(251, 180, 174), RGB(179, 205, 227), RGB(204, 235, 197), RGB(222, 203, 228), RGB(254, 217, 166), RGB(255, 255, 204), RGB(229, 216, 189), RGB(253, 218, 236), RGB(242, 242, 242) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Qualitative;
+
+			return new SCANPalette(c, "Pastel1", @type, c.Length);
+
+		}
+		/*** Sequential ***/
+		public static SCANPalette OrRd (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(254,232,200), RGB(253,187,132), RGB(227,074,051)}; break;
+			case 04: c = new[] {RGB(254,240,217), RGB(253,204,138), RGB(252,141,089), RGB(215,048,031)}; break;
+			case 05: c = new[] {RGB(254,240,217), RGB(253,204,138), RGB(252,141,089), RGB(227,074,051), RGB(179,000,0)}; break;
+			case 06: c = new[] {RGB(254,240,217), RGB(253,212,158), RGB(253,187,132), RGB(252,141,089), RGB(227,074,051), RGB(179,000,0)}; break;
+			case 07: c = new[] {RGB(254,240,217), RGB(253,212,158), RGB(253,187,132), RGB(252,141,089), RGB(239,101,072), RGB(215,048,031), RGB(153,000,0)}; break;
+			case 08: c = new[] {RGB(255,247,236), RGB(254,232,200), RGB(253,212,158), RGB(253,187,132), RGB(252,141,089), RGB(239,101,072), RGB(215,048,031), RGB(153,000,0)}; break;
+			default: c = new[] { RGB(255, 247, 236), RGB(254, 232, 200), RGB(253, 212, 158), RGB(253, 187, 132), RGB(252, 141, 089), RGB(239, 101, 072), RGB(215, 048, 031), RGB(179, 000, 0), RGB(127, 000, 0) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "OrRd", @type, c.Length);
+
+		}
+		public static SCANPalette PuBu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(236,231,242), RGB(166,189,219), RGB(043,140,190)}; break;
+			case 04: c = new[] {RGB(241,238,246), RGB(189,201,225), RGB(116,169,207), RGB(005,112,176)}; break;
+			case 05: c = new[] {RGB(241,238,246), RGB(189,201,225), RGB(116,169,207), RGB(043,140,190), RGB(004,090,141)}; break;
+			case 06: c = new[] {RGB(241,238,246), RGB(208,209,230), RGB(166,189,219), RGB(116,169,207), RGB(043,140,190), RGB(004,090,141)}; break;
+			case 07: c = new[] {RGB(241,238,246), RGB(208,209,230), RGB(166,189,219), RGB(116,169,207), RGB(054,144,192), RGB(005,112,176), RGB(003,078,123)}; break;
+			case 08: c = new[] {RGB(255,247,251), RGB(236,231,242), RGB(208,209,230), RGB(166,189,219), RGB(116,169,207), RGB(054,144,192), RGB(005,112,176), RGB(003,078,123)}; break;
+			default: c = new[] { RGB(255, 247, 251), RGB(236, 231, 242), RGB(208, 209, 230), RGB(166, 189, 219), RGB(116, 169, 207), RGB(054, 144, 192), RGB(005, 112, 176), RGB(004, 090, 141), RGB(002, 056, 088) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "PuBu", @type, c.Length);
+
+		}
+		public static SCANPalette BuPu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(224,236,244), RGB(158,188,218), RGB(136,086,167)}; break;
+			case 04: c = new[] {RGB(237,248,251), RGB(179,205,227), RGB(140,150,198), RGB(136,065,157)}; break;
+			case 05: c = new[] {RGB(237,248,251), RGB(179,205,227), RGB(140,150,198), RGB(136,086,167), RGB(129,015,124)}; break;
+			case 06: c = new[] {RGB(237,248,251), RGB(191,211,230), RGB(158,188,218), RGB(140,150,198), RGB(136,086,167), RGB(129,015,124)}; break;
+			case 07: c = new[] {RGB(237,248,251), RGB(191,211,230), RGB(158,188,218), RGB(140,150,198), RGB(140,107,177), RGB(136,065,157), RGB(110,001,107)}; break;
+			case 08: c = new[] {RGB(247,252,253), RGB(224,236,244), RGB(191,211,230), RGB(158,188,218), RGB(140,150,198), RGB(140,107,177), RGB(136,065,157), RGB(110,001,107)}; break;
+			default: c = new[] { RGB(247, 252, 253), RGB(224, 236, 244), RGB(191, 211, 230), RGB(158, 188, 218), RGB(140, 150, 198), RGB(140, 107, 177), RGB(136, 065, 157), RGB(129, 015, 124), RGB(077, 000, 075) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "BuPu", @type, c.Length);
+
+		}
+		public static SCANPalette Oranges (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(254,230,206), RGB(253,174,107), RGB(230,085,013)}; break;
+			case 04: c = new[] {RGB(254,237,222), RGB(253,190,133), RGB(253,141,060), RGB(217,071,001)}; break;
+			case 05: c = new[] {RGB(254,237,222), RGB(253,190,133), RGB(253,141,060), RGB(230,085,013), RGB(166,054,003)}; break;
+			case 06: c = new[] {RGB(254,237,222), RGB(253,208,162), RGB(253,174,107), RGB(253,141,060), RGB(230,085,013), RGB(166,054,003)}; break;
+			case 07: c = new[] {RGB(254,237,222), RGB(253,208,162), RGB(253,174,107), RGB(253,141,060), RGB(241,105,019), RGB(217,072,001), RGB(140,045,004)}; break;
+			case 08: c = new[] {RGB(255,245,235), RGB(254,230,206), RGB(253,208,162), RGB(253,174,107), RGB(253,141,060), RGB(241,105,019), RGB(217,072,001), RGB(140,045,004)}; break;
+			default: c = new[] { RGB(255, 245, 235), RGB(254, 230, 206), RGB(253, 208, 162), RGB(253, 174, 107), RGB(253, 141, 060), RGB(241, 105, 019), RGB(217, 072, 001), RGB(166, 054, 003), RGB(127, 039, 004) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "Oranges", @type, c.Length);
+
+		}
+		public static SCANPalette BuGn (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(229,245,249), RGB(153,216,201), RGB(044,162,095)}; break;
+			case 04: c = new[] {RGB(237,248,251), RGB(178,226,226), RGB(102,194,164), RGB(035,139,069)}; break;
+			case 05: c = new[] {RGB(237,248,251), RGB(178,226,226), RGB(102,194,164), RGB(044,162,095), RGB(000,109,044)}; break;
+			case 06: c = new[] {RGB(237,248,251), RGB(204,236,230), RGB(153,216,201), RGB(102,194,164), RGB(044,162,095), RGB(000,109,044)}; break;
+			case 07: c = new[] {RGB(237,248,251), RGB(204,236,230), RGB(153,216,201), RGB(102,194,164), RGB(065,174,118), RGB(035,139,069), RGB(000,088,036)}; break;
+			case 08: c = new[] {RGB(247,252,253), RGB(229,245,249), RGB(204,236,230), RGB(153,216,201), RGB(102,194,164), RGB(065,174,118), RGB(035,139,069), RGB(000,088,036)}; break;
+			default: c = new[] { RGB(247, 252, 253), RGB(229, 245, 249), RGB(204, 236, 230), RGB(153, 216, 201), RGB(102, 194, 164), RGB(065, 174, 118), RGB(035, 139, 069), RGB(000, 109, 044), RGB(000, 068, 027) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "BuGn", @type, c.Length);
+
+		}
+		public static SCANPalette YlOrBr (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(255,247,188), RGB(254,196,079), RGB(217,095,014)}; break;
+			case 04: c = new[] {RGB(255,255,212), RGB(254,217,142), RGB(254,153,041), RGB(204,076,002)}; break;
+			case 05: c = new[] {RGB(255,255,212), RGB(254,217,142), RGB(254,153,041), RGB(217,095,014), RGB(153,052,004)}; break;
+			case 06: c = new[] {RGB(255,255,212), RGB(254,227,145), RGB(254,196,079), RGB(254,153,041), RGB(217,095,014), RGB(153,052,004)}; break;
+			case 07: c = new[] {RGB(255,255,212), RGB(254,227,145), RGB(254,196,079), RGB(254,153,041), RGB(236,112,020), RGB(204,076,002), RGB(140,045,004)}; break;
+			case 08: c = new[] {RGB(255,255,229), RGB(255,247,188), RGB(254,227,145), RGB(254,196,079), RGB(254,153,041), RGB(236,112,020), RGB(204,076,002), RGB(140,045,004)}; break;
+			default: c = new[] { RGB(255, 255, 229), RGB(255, 247, 188), RGB(254, 227, 145), RGB(254, 196, 079), RGB(254, 153, 041), RGB(236, 112, 020), RGB(204, 076, 002), RGB(153, 052, 004), RGB(102, 037, 006) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "YlOrBr", @type, c.Length);
+
+		}
+		public static SCANPalette YlGn (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(247,252,185), RGB(173,221,142), RGB(049,163,084)}; break;
+			case 04: c = new[] {RGB(255,255,204), RGB(194,230,153), RGB(120,198,121), RGB(035,132,067)}; break;
+			case 05: c = new[] {RGB(255,255,204), RGB(194,230,153), RGB(120,198,121), RGB(049,163,084), RGB(000,104,055)}; break;
+			case 06: c = new[] {RGB(255,255,204), RGB(217,240,163), RGB(173,221,142), RGB(120,198,121), RGB(049,163,084), RGB(000,104,055)}; break;
+			case 07: c = new[] {RGB(255,255,204), RGB(217,240,163), RGB(173,221,142), RGB(120,198,121), RGB(065,171,093), RGB(035,132,067), RGB(000,090,050)}; break;
+			case 08: c = new[] {RGB(255,255,229), RGB(247,252,185), RGB(217,240,163), RGB(173,221,142), RGB(120,198,121), RGB(065,171,093), RGB(035,132,067), RGB(000,090,050)}; break;
+			default: c = new[] { RGB(255, 255, 229), RGB(247, 252, 185), RGB(217, 240, 163), RGB(173, 221, 142), RGB(120, 198, 121), RGB(065, 171, 093), RGB(035, 132, 067), RGB(000, 104, 055), RGB(000, 069, 041) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "YlGn", @type, c.Length);
+
+		}
+		public static SCANPalette Reds (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(254,224,210), RGB(252,146,114), RGB(222,045,038)}; break;
+			case 04: c = new[] {RGB(254,229,217), RGB(252,174,145), RGB(251,106,074), RGB(203,024,029)}; break;
+			case 05: c = new[] {RGB(254,229,217), RGB(252,174,145), RGB(251,106,074), RGB(222,045,038), RGB(165,015,021)}; break;
+			case 06: c = new[] {RGB(254,229,217), RGB(252,187,161), RGB(252,146,114), RGB(251,106,074), RGB(222,045,038), RGB(165,015,021)}; break;
+			case 07: c = new[] {RGB(254,229,217), RGB(252,187,161), RGB(252,146,114), RGB(251,106,074), RGB(239,059,044), RGB(203,024,029), RGB(153,000,013)}; break;
+			case 08: c = new[] {RGB(255,245,240), RGB(254,224,210), RGB(252,187,161), RGB(252,146,114), RGB(251,106,074), RGB(239,059,044), RGB(203,024,029), RGB(153,000,013)}; break;
+			default: c = new[] { RGB(255, 245, 240), RGB(254, 224, 210), RGB(252, 187, 161), RGB(252, 146, 114), RGB(251, 106, 074), RGB(239, 059, 044), RGB(203, 024, 029), RGB(165, 015, 021), RGB(103, 000, 013) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "Reds", @type, c.Length);
+
+		}
+		public static SCANPalette RdPu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(253,224,221), RGB(250,159,181), RGB(197,027,138)}; break;
+			case 04: c = new[] {RGB(254,235,226), RGB(251,180,185), RGB(247,104,161), RGB(174,001,126)}; break;
+			case 05: c = new[] {RGB(254,235,226), RGB(251,180,185), RGB(247,104,161), RGB(197,027,138), RGB(122,001,119)}; break;
+			case 06: c = new[] {RGB(254,235,226), RGB(252,197,192), RGB(250,159,181), RGB(247,104,161), RGB(197,027,138), RGB(122,001,119)}; break;
+			case 07: c = new[] {RGB(254,235,226), RGB(252,197,192), RGB(250,159,181), RGB(247,104,161), RGB(221,052,151), RGB(174,001,126), RGB(122,001,119)}; break;
+			case 08: c = new[] {RGB(255,247,243), RGB(253,224,221), RGB(252,197,192), RGB(250,159,181), RGB(247,104,161), RGB(221,052,151), RGB(174,001,126), RGB(122,001,119)}; break;
+			default: c = new[] { RGB(255, 247, 243), RGB(253, 224, 221), RGB(252, 197, 192), RGB(250, 159, 181), RGB(247, 104, 161), RGB(221, 052, 151), RGB(174, 001, 126), RGB(122, 001, 119), RGB(073, 000, 106) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "RdPu", @type, c.Length);
+
+		}
+		public static SCANPalette Greens (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(229,245,224), RGB(161,217,155), RGB(049,163,084)}; break;
+			case 04: c = new[] {RGB(237,248,233), RGB(186,228,179), RGB(116,196,118), RGB(035,139,069)}; break;
+			case 05: c = new[] {RGB(237,248,233), RGB(186,228,179), RGB(116,196,118), RGB(049,163,084), RGB(000,109,044)}; break;
+			case 06: c = new[] {RGB(237,248,233), RGB(199,233,192), RGB(161,217,155), RGB(116,196,118), RGB(049,163,084), RGB(000,109,044)}; break;
+			case 07: c = new[] {RGB(237,248,233), RGB(199,233,192), RGB(161,217,155), RGB(116,196,118), RGB(065,171,093), RGB(035,139,069), RGB(000,090,050)}; break;
+			case 08: c = new[] {RGB(247,252,245), RGB(229,245,224), RGB(199,233,192), RGB(161,217,155), RGB(116,196,118), RGB(065,171,093), RGB(035,139,069), RGB(000,090,050)}; break;
+			default: c = new[] { RGB(247, 252, 245), RGB(229, 245, 224), RGB(199, 233, 192), RGB(161, 217, 155), RGB(116, 196, 118), RGB(065, 171, 093), RGB(035, 139, 069), RGB(000, 109, 044), RGB(000, 068, 027) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "Greens", @type, c.Length);
+
+		}
+		public static SCANPalette YlGnBu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(237,248,177), RGB(127,205,187), RGB(044,127,184)}; break;
+			case 04: c = new[] {RGB(255,255,204), RGB(161,218,180), RGB(065,182,196), RGB(034,094,168)}; break;
+			case 05: c = new[] {RGB(255,255,204), RGB(161,218,180), RGB(065,182,196), RGB(044,127,184), RGB(037,052,148)}; break;
+			case 06: c = new[] {RGB(255,255,204), RGB(199,233,180), RGB(127,205,187), RGB(065,182,196), RGB(044,127,184), RGB(037,052,148)}; break;
+			case 07: c = new[] {RGB(255,255,204), RGB(199,233,180), RGB(127,205,187), RGB(065,182,196), RGB(029,145,192), RGB(034,094,168), RGB(012,044,132)}; break;
+			case 08: c = new[] {RGB(255,255,217), RGB(237,248,177), RGB(199,233,180), RGB(127,205,187), RGB(065,182,196), RGB(029,145,192), RGB(034,094,168), RGB(012,044,132)}; break;
+			default: c = new[] { RGB(255, 255, 217), RGB(237, 248, 177), RGB(199, 233, 180), RGB(127, 205, 187), RGB(065, 182, 196), RGB(029, 145, 192), RGB(034, 094, 168), RGB(037, 052, 148), RGB(008, 029, 088) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "YlGnBu", @type, c.Length);
+
+		}
+		public static SCANPalette Purples (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(239,237,245), RGB(188,189,220), RGB(117,107,177)}; break;
+			case 04: c = new[] {RGB(242,240,247), RGB(203,201,226), RGB(158,154,200), RGB(106,081,163)}; break;
+			case 05: c = new[] {RGB(242,240,247), RGB(203,201,226), RGB(158,154,200), RGB(117,107,177), RGB(084,039,143)}; break;
+			case 06: c = new[] {RGB(242,240,247), RGB(218,218,235), RGB(188,189,220), RGB(158,154,200), RGB(117,107,177), RGB(084,039,143)}; break;
+			case 07: c = new[] {RGB(242,240,247), RGB(218,218,235), RGB(188,189,220), RGB(158,154,200), RGB(128,125,186), RGB(106,081,163), RGB(074,020,134)}; break;
+			case 08: c = new[] {RGB(252,251,253), RGB(239,237,245), RGB(218,218,235), RGB(188,189,220), RGB(158,154,200), RGB(128,125,186), RGB(106,081,163), RGB(074,020,134)}; break;
+			default: c = new[] { RGB(252, 251, 253), RGB(239, 237, 245), RGB(218, 218, 235), RGB(188, 189, 220), RGB(158, 154, 200), RGB(128, 125, 186), RGB(106, 081, 163), RGB(084, 039, 143), RGB(063, 000, 125) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "Purples", @type, c.Length);
+
+		}
+		public static SCANPalette GnBu (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(224,243,219), RGB(168,221,181), RGB(067,162,202)}; break;
+			case 04: c = new[] {RGB(240,249,232), RGB(186,228,188), RGB(123,204,196), RGB(043,140,190)}; break;
+			case 05: c = new[] {RGB(240,249,232), RGB(186,228,188), RGB(123,204,196), RGB(067,162,202), RGB(008,104,172)}; break;
+			case 06: c = new[] {RGB(240,249,232), RGB(204,235,197), RGB(168,221,181), RGB(123,204,196), RGB(067,162,202), RGB(008,104,172)}; break;
+			case 07: c = new[] {RGB(240,249,232), RGB(204,235,197), RGB(168,221,181), RGB(123,204,196), RGB(078,179,211), RGB(043,140,190), RGB(008,088,158)}; break;
+			case 08: c = new[] {RGB(247,252,240), RGB(224,243,219), RGB(204,235,197), RGB(168,221,181), RGB(123,204,196), RGB(078,179,211), RGB(043,140,190), RGB(008,088,158)}; break;
+			default: c = new[] { RGB(247, 252, 240), RGB(224, 243, 219), RGB(204, 235, 197), RGB(168, 221, 181), RGB(123, 204, 196), RGB(078, 179, 211), RGB(043, 140, 190), RGB(008, 104, 172), RGB(008, 064, 129) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "GnBu", @type, c.Length);
+
+		}
+		public static SCANPalette Greys (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(240,240,240), RGB(189,189,189), RGB(099,099,099)}; break;
+			case 04: c = new[] {RGB(247,247,247), RGB(204,204,204), RGB(150,150,150), RGB(082,082,082)}; break;
+			case 05: c = new[] {RGB(247,247,247), RGB(204,204,204), RGB(150,150,150), RGB(099,099,099), RGB(037,037,037)}; break;
+			case 06: c = new[] {RGB(247,247,247), RGB(217,217,217), RGB(189,189,189), RGB(150,150,150), RGB(099,099,099), RGB(037,037,037)}; break;
+			case 07: c = new[] {RGB(247,247,247), RGB(217,217,217), RGB(189,189,189), RGB(150,150,150), RGB(115,115,115), RGB(082,082,082), RGB(037,037,037)}; break;
+			case 08: c = new[] {RGB(255,255,255), RGB(240,240,240), RGB(217,217,217), RGB(189,189,189), RGB(150,150,150), RGB(115,115,115), RGB(082,082,082), RGB(037,037,037)}; break;
+			default: c = new[] { RGB(255, 255, 255), RGB(240, 240, 240), RGB(217, 217, 217), RGB(189, 189, 189), RGB(150, 150, 150), RGB(115, 115, 115), RGB(082, 082, 082), RGB(037, 037, 037), RGB(000, 0, 000) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "Greys", @type, c.Length);
+
+		}
+		public static SCANPalette YlOrRd (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(255,237,160), RGB(254,178,076), RGB(240,059,032)}; break;
+			case 04: c = new[] {RGB(255,255,178), RGB(254,204,092), RGB(253,141,060), RGB(227,026,028)}; break;
+			case 05: c = new[] {RGB(255,255,178), RGB(254,204,092), RGB(253,141,060), RGB(240,059,032), RGB(189,000,038)}; break;
+			case 06: c = new[] {RGB(255,255,178), RGB(254,217,118), RGB(254,178,076), RGB(253,141,060), RGB(240,059,032), RGB(189,000,038)}; break;
+			case 07: c = new[] {RGB(255,255,178), RGB(254,217,118), RGB(254,178,076), RGB(253,141,060), RGB(252,078,042), RGB(227,026,028), RGB(177,000,038)}; break;
+			case 08: c = new[] {RGB(255,255,204), RGB(255,237,160), RGB(254,217,118), RGB(254,178,076), RGB(253,141,060), RGB(252,078,042), RGB(227,026,028), RGB(177,000,038)}; break;
+			default: c = new[] { RGB(255, 255, 204), RGB(255, 237, 160), RGB(254, 217, 118), RGB(254, 178, 076), RGB(253, 141, 060), RGB(252, 078, 042), RGB(227, 026, 028), RGB(189, 000, 038), RGB(128, 000, 038) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "YlOrRd", @type, c.Length);
+
+		}
+		public static SCANPalette PuRd (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(231,225,239), RGB(201,148,199), RGB(221,028,119)}; break;
+			case 04: c = new[] {RGB(241,238,246), RGB(215,181,216), RGB(223,101,176), RGB(206,018,086)}; break;
+			case 05: c = new[] {RGB(241,238,246), RGB(215,181,216), RGB(223,101,176), RGB(221,028,119), RGB(152,000,067)}; break;
+			case 06: c = new[] {RGB(241,238,246), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(221,028,119), RGB(152,000,067)}; break;
+			case 07: c = new[] {RGB(241,238,246), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(231,041,138), RGB(206,018,086), RGB(145,000,063)}; break;
+			case 08: c = new[] {RGB(247,244,249), RGB(231,225,239), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(231,041,138), RGB(206,018,086), RGB(145,000,063)}; break;
+			default: c = new[] {RGB(247,244,249), RGB(231,225,239), RGB(212,185,218), RGB(201,148,199), RGB(223,101,176), RGB(231,041,138), RGB(206,018,086), RGB(152,000,067), RGB(103,000,031)}; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "PuRd", @type, c.Length);
+
+		}
+		public static SCANPalette Blues (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(222,235,247), RGB(158,202,225), RGB(049,130,189)}; break;
+			case 04: c = new[] {RGB(239,243,255), RGB(189,215,231), RGB(107,174,214), RGB(033,113,181)}; break;
+			case 05: c = new[] {RGB(239,243,255), RGB(189,215,231), RGB(107,174,214), RGB(049,130,189), RGB(008,081,156)}; break;
+			case 06: c = new[] {RGB(239,243,255), RGB(198,219,239), RGB(158,202,225), RGB(107,174,214), RGB(049,130,189), RGB(008,081,156)}; break;
+			case 07: c = new[] {RGB(239,243,255), RGB(198,219,239), RGB(158,202,225), RGB(107,174,214), RGB(066,146,198), RGB(033,113,181), RGB(008,069,148)}; break;
+			case 08: c = new[] {RGB(247,251,255), RGB(222,235,247), RGB(198,219,239), RGB(158,202,225), RGB(107,174,214), RGB(066,146,198), RGB(033,113,181), RGB(008,069,148)}; break;
+			default: c = new[] { RGB(247, 251, 255), RGB(222, 235, 247), RGB(198, 219, 239), RGB(158, 202, 225), RGB(107, 174, 214), RGB(066, 146, 198), RGB(033, 113, 181), RGB(008, 081, 156), RGB(008, 048, 107) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "Blues", @type, c.Length);
+
+		}
+		public static SCANPalette PuBuGn (int size) {
+			Color32[] c;
+			switch (size) {
+			case 03: c = new[] {RGB(236,226,240), RGB(166,189,219), RGB(028,144,153)}; break;
+			case 04: c = new[] {RGB(246,239,247), RGB(189,201,225), RGB(103,169,207), RGB(002,129,138)}; break;
+			case 05: c = new[] {RGB(246,239,247), RGB(189,201,225), RGB(103,169,207), RGB(028,144,153), RGB(001,108,089)}; break;
+			case 06: c = new[] {RGB(246,239,247), RGB(208,209,230), RGB(166,189,219), RGB(103,169,207), RGB(028,144,153), RGB(001,108,089)}; break;
+			case 07: c = new[] {RGB(246,239,247), RGB(208,209,230), RGB(166,189,219), RGB(103,169,207), RGB(054,144,192), RGB(002,129,138), RGB(001,100,080)}; break;
+			case 08: c = new[] {RGB(255,247,251), RGB(236,226,240), RGB(208,209,230), RGB(166,189,219), RGB(103,169,207), RGB(054,144,192), RGB(002,129,138), RGB(001,100,080)}; break;
+			default: c = new[] { RGB(255, 247, 251), RGB(236, 226, 240), RGB(208, 209, 230), RGB(166, 189, 219), RGB(103, 169, 207), RGB(054, 144, 192), RGB(002, 129, 138), RGB(001, 108, 089), RGB(001, 070, 054) }; break;
+			//default: goto case 03;
+			}
+			var @type = SCANPaletteKind.Sequential;
+
+			return new SCANPalette(c, "PuBuGn", @type, c.Length);
+		}
+
+
+
+
+	}
+
+}
\ No newline at end of file
diff --git a/SCANsat/SCAN_Palettes/FixedColorPalettes.cs b/SCANsat/SCAN_Palettes/FixedColorPalettes.cs
new file mode 100644
index 000000000..e36215290
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/FixedColorPalettes.cs
@@ -0,0 +1,121 @@
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCAN FixedColorSCANPalettes - static class for generating fixed size color SCANPalettes; see each SCANPalette for licensing information
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
+using UnityEngine;
+using SCANsat.SCAN_Data;
+
+namespace SCANsat.SCAN_Palettes
+{
+	public static class FixedColorPalettes
+	{
+		static Func RGB = (r, g, b) => new Color32(r, g, b, 255);
+
+		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
+		 * Black Forest Scheme - Schwarzwald-topographie - http://commons.wikimedia.org/wiki/File:Schwarzwald-topographie.png
+		 * */
+		public static SCANPalette blackForest()
+		{
+			Color32[] c;
+			c = new[] { RGB(176, 243, 190), RGB(224, 251, 178), RGB(184, 222, 118), RGB(39, 165, 42), RGB(52, 136, 60), RGB(156,164,41), RGB(248,176,4), RGB(192,74,2), RGB(135,8,0), RGB(116,24,5), RGB(108,42,10), RGB(125,74,43), RGB(156,129,112), RGB(181,181,181), RGB(218,216,218)};
+			return new SCANPalette(c, "blackForest", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* A freely available color scheme by Mark J. Fenbers
+		 * http://soliton.vm.bytemark.co.uk/pub/cpt-city/mjf/copying.html
+		 * */
+		public static SCANPalette departure()
+		{
+			Color32[] c;
+			c = new[] { RGB(68, 34, 0), RGB(102, 51, 0), RGB(160, 108, 60), RGB(218, 166, 120), RGB(238, 212, 188), RGB(255, 255, 255), RGB(200, 255, 200), RGB(100, 255, 100), RGB(0, 255, 0), RGB(0, 192, 0), RGB(0, 128, 0) };
+			return new SCANPalette(c, "departure", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
+		 * http://commons.wikimedia.org/wiki/File:North_Rhine-Westphalia_Topography_01.svg
+		 * */
+		public static SCANPalette northRhine()
+		{
+			Color32[] c;
+			c = new[] { RGB(5, 6, 3), RGB(55, 55, 36), RGB(24, 62, 41), RGB(52, 105, 69), RGB(62, 138, 89), RGB(108, 163, 99), RGB(165, 186, 111), RGB(231, 213, 122), RGB(199, 167, 92), RGB(176, 120, 58) };
+			return new SCANPalette(c, "northRhine", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
+		 * Mars color scheme by PZmaps - http://commons.wikimedia.org/wiki/User:PZmaps
+		 * */
+		public static SCANPalette mars()
+		{
+			Color32[] c;
+			c = new[] { RGB(120, 65, 20), RGB(141, 84, 43), RGB(164, 114, 66), RGB(188, 144, 89), RGB(211, 174, 112), RGB(235, 205, 136), RGB(219, 185, 120), RGB(204, 165, 105), RGB(189, 145, 90), RGB(174, 125, 75), RGB(159, 110, 70), RGB(160, 120, 80), RGB(174, 134, 100), RGB(189, 163, 140), RGB(204, 191, 180), RGB(220, 212, 205), RGB(240, 232, 225), RGB(255, 255, 255) };
+			return new SCANPalette(c, "mars", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		//A public domain Wikipedia color scheme - http://soliton.vm.bytemark.co.uk/pub/cpt-city/wkp/template/index.html
+		public static SCANPalette wiki2()
+		{
+			Color32[] c;
+			c = new[] { RGB(113, 171, 216), RGB(216, 242, 254), RGB(148, 191, 139), RGB(239, 235, 192), RGB(170, 135, 83), RGB(245, 244, 242) };
+			return new SCANPalette(c, "wiki2", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* Wikipedia color scheme licensed under Creative Commons Attribution-Share Alike 3.0 Unported license
+		 * Plumbago Scheme- http://en.wikipedia.org/wiki/File:AYool_topography_15min.png
+		 * */
+		public static SCANPalette plumbago()
+		{
+			Color32[] c;
+			c = new[] { RGB(151, 0, 176), RGB(23, 0, 151), RGB(203, 254, 254), RGB(0, 168, 0), RGB(254, 254, 126), RGB(87, 36, 36), RGB(203, 101, 203), RGB(228, 190, 228) };
+			return new SCANPalette(c, "plumbago", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* A freely available color scheme by Meghan Miller
+		 * http://soliton.vm.bytemark.co.uk/pub/cpt-city/cw/index.html
+		 * */
+		public static SCANPalette cw1_013()
+		{
+			Color32[] c;
+			c = new[] { RGB(97, 65, 78), RGB(226, 87, 68), RGB(252, 255, 67), RGB(86, 118, 157), RGB(167, 214, 255) };
+			return new SCANPalette(c, "cw1_013", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* A freely available color scheme from Arendal
+		 * http://soliton.vm.bytemark.co.uk/pub/cpt-city/arendal/copying.html
+		 * */
+		public static SCANPalette arctic()
+		{
+			Color32[] c;
+			c = new[] { RGB(44, 53, 99), RGB(197, 197, 206), RGB(150, 210, 131), RGB(174, 223, 135), RGB(195, 230, 138), RGB(218, 237, 142), RGB(226, 233, 137), RGB(232, 217, 119), RGB(238, 200, 102), RGB(231, 183, 89), RGB(196, 167, 89), RGB(174, 158, 89) };
+			return new SCANPalette(c, "arctic", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		/* From the USGS Mercury MESSENGER topographic map
+		 * http://astrogeology.usgs.gov/search/map/Mercury/Topography/MESSENGER/Mercury-MESSENGER-DEM
+		 */
+		public static SCANPalette mercury()
+		{
+			Color32[] c;
+			c = new[] { RGB(22, 22, 22), RGB(195, 130, 185), RGB(170, 120, 156), RGB(160, 120, 200), RGB(141, 96, 179), RGB(62, 30, 121), RGB(20, 0, 193), RGB(30, 50, 194), RGB(58, 102, 219), RGB(78, 135, 215), RGB(113, 196, 255), RGB(95, 210, 220), RGB(125, 213, 226), RGB(105, 188, 206), RGB(140, 185, 205), RGB(170, 181, 201), RGB(195, 203, 192), RGB(180, 205, 157), RGB(105, 195, 101), RGB(114, 171, 79), RGB(128, 156, 106), RGB(104, 106, 74), RGB(79, 46, 36), RGB(110, 71, 60), RGB(140, 94, 55), RGB(175, 137, 65), RGB(202, 166, 59), RGB(226, 211, 62), RGB(215, 136, 35), RGB(191, 75, 42), RGB(206, 20, 20), RGB(236, 75, 79), RGB(236, 178, 157), RGB(255, 255, 255) };
+			return new SCANPalette(c, "mercury", SCANPaletteKind.Fixed, c.Length);
+		}
+
+
+		public static SCANPalette venus()
+		{
+			Color32[] c;
+			c = new[] { RGB(93, 61, 126), RGB(52, 52, 152), RGB(81, 164, 168), RGB(54, 156, 51), RGB(197, 199, 94), RGB(153, 95, 66), RGB(166, 69, 69), RGB(183, 88, 154) };
+			return new SCANPalette(c, "venus", SCANPaletteKind.Fixed, c.Length);
+		}
+
+	}
+}

From a603e8aca30e56172e476a4f0122effee129ba2c Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:47:18 -0400
Subject: [PATCH 10/29] Rename SCANpalette; update to new color palette system

---
 SCANsat/SCAN_UI/UI_Framework/SCANcolorUtil.cs | 357 ++++++++++++++++++
 1 file changed, 357 insertions(+)
 create mode 100644 SCANsat/SCAN_UI/UI_Framework/SCANcolorUtil.cs

diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANcolorUtil.cs b/SCANsat/SCAN_UI/UI_Framework/SCANcolorUtil.cs
new file mode 100644
index 000000000..88ac5b1f2
--- /dev/null
+++ b/SCANsat/SCAN_UI/UI_Framework/SCANcolorUtil.cs
@@ -0,0 +1,357 @@
+#region license
+/*
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ * 
+ * SCANpalette - manages colors and palettes of colors
+ *
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+*/
+#endregion
+
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using SCANsat.SCAN_Data;
+using SCANsat.SCAN_Palettes;
+
+namespace SCANsat.SCAN_UI.UI_Framework
+{
+	public class SCANcolorUtil
+	{
+
+		// Basic Colors
+		// 	(these are here just so that all references to some color are the same throughout
+		//		SCANsat)
+		public static Color black 	= Color.black;
+		public static Color32 Black = (Color32)black;
+		public static Color white 	= Color.white;
+		public static Color32 White = (Color32)white;
+		public static Color red		= Color.red;
+		public static Color32 Red = (Color32)red;
+		public static Color grey		= Color.grey;
+		public static Color32 Grey = (Color32)grey;
+		public static Color clear	= Color.clear;
+		public static Color32 Clear = new Color32(0, 0, 0, 0);
+		public static Color magenta	= Color.magenta;
+		public static Color yellow	= Color.yellow;
+		public static Color cyan		= Color.cyan;
+		public static Color blue		= Color.blue;
+		public static Color green	= Color.green;
+		public static Color mechjebYellow = new Color(1.0f, 0.56f, 0.0f);
+
+		public static Color lerp (Color a, Color b, float t) {
+			return Color.Lerp (a,b,t);
+		}
+
+		public static Color32 lerp(Color32 a, Color32 b, float t)
+		{
+			return Color32.Lerp(a, b, t);
+		}
+
+		// XKCD Colors
+		// 	(these are collected here for the same reason)
+
+		public static Color xkcd_Amber		= XKCDColors.Amber;
+		public static Color xkcd_ArmyGreen		= XKCDColors.ArmyGreen;
+		public static Color xkcd_PukeGreen		= XKCDColors.PukeGreen;
+		public static Color xkcd_Lemon		= XKCDColors.Lemon;
+		public static Color xkcd_OrangeRed 	= XKCDColors.OrangeRed;
+		public static Color xkcd_CamoGreen		= XKCDColors.CamoGreen;
+		public static Color xkcd_Marigold		= XKCDColors.Marigold;
+		public static Color xkcd_Puce			= XKCDColors.Puce;
+		public static Color xkcd_DarkTeal 		= XKCDColors.DarkTeal;
+		public static Color xkcd_DarkPurple	= XKCDColors.DarkPurple;
+		public static Color xkcd_DarkGrey		= XKCDColors.DarkGrey;
+		public static Color xkcd_LightGrey		= XKCDColors.LightGrey;
+		public static Color xkcd_PurplyPink	= XKCDColors.PurplyPink;
+		public static Color xkcd_Magenta		= XKCDColors.Magenta;
+		public static Color xkcd_YellowGreen	= XKCDColors.YellowGreen;
+		public static Color xkcd_LightRed		= XKCDColors.LightRed;
+		public static Color xkcd_Cerulean		= XKCDColors.Cerulean;
+		public static Color xkcd_Yellow		= XKCDColors.Yellow;
+		public static Color xkcd_Red			= XKCDColors.Red;
+		public static Color xkcd_White		= XKCDColors.White;
+		public static Color xkcd_DarkGreenAlpha = XKCDColors.DarkGreen * new Vector4(1, 1, 1, 0.4f);
+
+
+		// colourblind barrier-free colours, according to Masataka Okabe and Kei Ito
+		// http://jfly.iam.u-tokyo.ac.jp/color/
+
+		public static Color cb_skyBlue 		= new Color(0.35f, 0.7f, 0.9f);		// sky blue
+		public static Color cb_bluishGreen 	= new Color(0f, 0.6f, 0.5f);		// bluish green
+		public static Color cb_yellow 		= new Color(0.95f, 0.9f, 0.25f);	// yellow
+		public static Color cb_blue 			= new Color(0f, 0.45f, 0.7f);		// blue
+		public static Color cb_vermillion 		= new Color(0.8f, 0.4f, 0f);		// vermillion
+		public static Color cb_reddishPurple	= new Color(0.8f, 0.6f, 0.7f);		// reddish purple
+		public static Color cb_orange 		= new Color(0.9f, 0.6f, 0f);		// orange
+
+		public static Color32 CB_skyBlue = (Color32)cb_skyBlue;
+		public static Color32 CB_bluishGreen = (Color32)cb_bluishGreen;
+		public static Color32 CB_yellow = (Color32)cb_yellow;
+		public static Color32 CB_blue = (Color32)cb_blue;
+		public static Color32 CB_vermillion = (Color32)cb_vermillion;
+		public static Color32 CB_reddishPurple = (Color32)cb_reddishPurple;
+		public static Color32 CB_orange = (Color32)cb_orange;
+
+		/* SOLARIZED colors: currently unused, so commented out */
+		/*
+		public static Color sol_base03 	= new Color32(0,43,54,255);
+		public static Color sol_base02 	= new Color32(7,54,66,255);
+		public static Color sol_base01 	= new Color32(88,110,117,255);
+		public static Color sol_base00 	= new Color32(101,123,131,255);
+		public static Color sol_base0 	= new Color32(131,148,150,255);
+		public static Color sol_base1 	= new Color32(147,161,161,255);
+		public static Color sol_base2 	= new Color32(238,232,213,255);
+		public static Color sol_base3 	= new Color32(253,246,227,255);
+		public static Color sol_yellow 	= new Color32(181,137,0,255);
+		public static Color sol_orange 	= new Color32(203,75,22,255);
+		public static Color sol_red 		= new Color32(45,220,50,255);
+		public static Color sol_magenta 	= new Color32(211,54,130,255);
+		public static Color sol_violet 	= new Color32(108,113,196,255);
+		public static Color sol_blue 		= new Color32(38,139,210,255);
+		public static Color sol_cyan 		= new Color32(42,161,152,255);
+		public static Color sol_green 	= new Color32(133,153,0,255);
+		*/
+		public static Color[] heightGradient = {
+			xkcd_ArmyGreen,
+			xkcd_Yellow,
+			xkcd_Red,
+			xkcd_Magenta,
+			xkcd_White,
+			xkcd_White
+		};
+
+		public static Color32[] redline;
+
+		public static Color32[] small_redline;
+
+		public static Color32 heightToColor(float val, bool color, SCANterrainConfig terrain, float min = 0, float max = 0, float range = 0, bool useCustomRange = false)
+		{
+			Color32[] c = terrain.ColorPal.ColorsArray;
+			if (terrain.PalRev)
+				c = terrain.ColorPal.ColorsReverse;
+			if (useCustomRange)
+			{
+				if (color)
+					return heightToColor(val, max, min, range, terrain.ClampTerrain, terrain.PalDis, c, true);
+				else
+					return heightToColor(val, max, min, range, terrain.PalDis);
+			}
+			else
+			{
+				if (color)
+					return heightToColor(val, terrain.MaxTerrain, terrain.MinTerrain, terrain.TerrainRange, terrain.ClampTerrain, terrain.PalDis, c);
+				else
+					return heightToColor(val, terrain.MaxTerrain, terrain.MinTerrain, terrain.TerrainRange, terrain.PalDis);
+			}
+		}
+
+		private static Color32 heightToColor(float val, float max, float min, float range, bool discrete)
+		{
+			Color32 c = Black;
+			val -= min;
+			if (SCAN_Settings_Config.Instance.TrueGreyScale)
+			{
+				val = Mathf.Clamp(val, 0, range) / range;
+				c = lerp(Black, White, val);
+			}
+			else
+			{
+				if (discrete)
+				{
+					val = (GreyScalePalette.ColorsReverse.Length) * Mathf.Clamp(val, 0, range) / range;
+					if (Math.Floor(val) > GreyScalePalette.ColorsReverse.Length - 1)
+						val = GreyScalePalette.ColorsReverse.Length - 0.01f;
+					c = GreyScalePalette.ColorsReverse[(int)Math.Floor(val)];
+				}
+				else
+				{
+					val = (GreyScalePalette.ColorsReverse.Length - 1) * Mathf.Clamp(val, 0, range) / range;
+					if (Math.Floor(val) > GreyScalePalette.ColorsReverse.Length - 2)
+						val = GreyScalePalette.ColorsReverse.Length - 1.01f;
+					c = lerp(GreyScalePalette.ColorsReverse[(int)Math.Floor(val)], GreyScalePalette.ColorsReverse[(int)Math.Floor(val) + 1], val - (int)Math.Floor(val));
+				}
+			}
+			return c;
+		}
+
+		internal static Color32 heightToColor(float val, float max, float min, float range, float? clamp, bool discrete, Color32[] p, bool useCustomRange = false)
+		{
+			Color32 c = Black;
+			if (clamp != null)
+			{
+				if (!useCustomRange)
+				{
+					if (clamp < min + 10f)
+						clamp = min + 10f;
+					if (clamp > max - 10f)
+						clamp = max - 10f;
+				}
+
+				if (val <= (float)clamp)
+				{
+					float newRange;
+
+					if (useCustomRange)
+					{
+						if (max < (float)clamp)
+							newRange = max - min;
+						else
+							newRange = (float)clamp - min;
+					}
+					else
+						newRange = (float)clamp - min;
+
+					val -= min;
+
+					val = Mathf.Clamp(val, 0, newRange) / newRange;
+
+					if (discrete)
+						c = p[(int)Math.Round(val)];
+					else
+						c = lerp(p[0], p[1], val);
+				}
+				else
+				{
+					float newRange;
+
+					if (useCustomRange)
+					{
+						if (min > (float)clamp)
+						{
+							newRange = max - min;
+							val -= min;
+						}
+						else
+						{
+							newRange = max - (float)clamp;
+							val -= (float)clamp;
+						}
+					}
+					else
+					{
+						newRange = max - (float)clamp;
+						val -= (float)clamp;
+					}
+
+					if (discrete)
+					{
+						val = (p.Length - 2) * Mathf.Clamp(val, 0, newRange) / newRange;
+						if (Math.Floor(val) > p.Length - 3)
+							val = p.Length - 2.01f;
+						c = p[(int)Math.Floor(val) + 2];
+					}
+					else
+					{
+						val = (p.Length - 3) * Mathf.Clamp(val, 0, newRange) / newRange;
+						if (Math.Floor(val) > p.Length - 4)
+							val = p.Length - 3.01f;
+						c = lerp(p[(int)Math.Floor(val) + 2], p[(int)Math.Floor(val) + 3], val - (int)Math.Floor(val));
+					}
+				}
+			}
+			else
+			{
+				val -= min;
+				if (discrete)
+				{
+					val = (p.Length) * Mathf.Clamp(val, 0, range) / range;
+					if (Math.Floor(val) > p.Length - 1)
+						val = p.Length - 0.01f;
+					c = p[(int)Math.Floor(val)];
+				}
+				else
+				{
+					val = (p.Length - 1) * Mathf.Clamp(val, 0, range) / range;
+					if (Math.Floor(val) > p.Length - 2)
+						val = p.Length - 1.01f;
+					c = lerp(p[(int)Math.Floor(val)], p[(int)Math.Floor(val) + 1], val - (int)Math.Floor(val));
+				}
+			}
+			return c;
+		}
+
+		public static string colorHex ( Color32 c ) {
+			return string.Format("#{0:X2}{1:X2}{2:X2}", c.r, c.g, c.b);
+		}
+		public static string coloredNoQuote(Color c, string text)
+		{
+			return string.Format("{1}", colorHex(c), text);
+		}
+
+		internal static Color c_good
+		{
+			get
+			{
+				if (SCANcontroller.controller.mainMapColor)
+					return cb_bluishGreen;
+				else
+					return cb_skyBlue;
+			}
+		}
+		internal static Color c_bad
+		{
+			get
+			{
+				return cb_orange;
+			}
+		}
+		internal static Color c_ugly {
+			get
+			{
+				if (SCANcontroller.controller.mainMapColor)
+					return xkcd_LightRed;
+				else
+					return cb_yellow;
+			}
+		}
+
+		private static SCANPaletteType currentPaletteSet;
+		private static SCANPalette greyScalePalette;
+		
+		public static SCANPaletteType SetCurrentPalettesType(SCANPaletteKind type)
+		{
+			return SCANconfigLoader.SCANPalettes.GetPaletteType(type);
+		}
+
+		public static SCANPalette GreyScalePalette
+		{
+			get
+			{
+				if (greyScalePalette == null)
+				{
+					Color32[] c = new Color32[9] { new Color32(255, 255, 255, 255), new Color32(240, 240, 240, 255), new Color32(217, 217, 217, 255), new Color32(189, 189, 189, 255), new Color32(150, 150, 150, 255), new Color32(115, 115, 115, 255), new Color32(082, 082, 082, 255), new Color32(037, 037, 037, 255), new Color32(000, 0, 000, 255) };
+
+					greyScalePalette = new SCANPalette(c, "GreyScalePalette", SCANPaletteKind.Fixed, c.Length);
+				}
+
+				return greyScalePalette;
+			}
+		}
+
+		public static SCANPaletteType CurrentPalettes
+		{
+			get { return currentPaletteSet; }
+			internal set
+			{
+				currentPaletteSet = value;
+			}
+		}
+
+		public static string[] GetPaletteKindNames()
+		{
+			SCANPaletteKind[] v = (SCANPaletteKind[])Enum.GetValues(typeof(SCANPaletteKind));
+
+			string[] r = new string[v.Length - 1];
+
+			for (int i = 0; i < v.Length - 1; ++i)
+				r[i] = v[i].ToString();
+
+			return r;
+		}
+
+	}
+}
+

From 63ec0eb211d728ef3d95ad7c1141ca83c6da1e72 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:47:46 -0400
Subject: [PATCH 11/29] New files for color palette system

---
 SCANsat/SCAN_Palette_Config.cs            | 164 +++++++++++++
 SCANsat/SCAN_Palettes/SCANPalette.cs      | 116 ++++++++++
 SCANsat/SCAN_Palettes/SCANPaletteGroup.cs | 137 +++++++++++
 SCANsat/SCAN_Palettes/SCANPaletteKind.cs  |  13 ++
 SCANsat/SCAN_Palettes/SCANPaletteType.cs  | 265 ++++++++++++++++++++++
 5 files changed, 695 insertions(+)
 create mode 100644 SCANsat/SCAN_Palette_Config.cs
 create mode 100644 SCANsat/SCAN_Palettes/SCANPalette.cs
 create mode 100644 SCANsat/SCAN_Palettes/SCANPaletteGroup.cs
 create mode 100644 SCANsat/SCAN_Palettes/SCANPaletteKind.cs
 create mode 100644 SCANsat/SCAN_Palettes/SCANPaletteType.cs

diff --git a/SCANsat/SCAN_Palette_Config.cs b/SCANsat/SCAN_Palette_Config.cs
new file mode 100644
index 000000000..b81cffa1d
--- /dev/null
+++ b/SCANsat/SCAN_Palette_Config.cs
@@ -0,0 +1,164 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using SCANsat.SCAN_Palettes;
+using SCANsat.SCAN_Platform;
+using UnityEngine;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
+
+namespace SCANsat
+{
+	public class SCAN_Palette_Config : SCAN_ConfigNodeStorage
+	{
+		[Persistent]
+		private List PaletteTypes = new List();
+
+		private DictionaryValueList MasterPaletteTypeList = new DictionaryValueList();
+
+		private SCANPalette _defaultPalette;
+
+		public SCANPalette DefaultPalette
+		{
+			get
+			{
+				if (_defaultPalette == null)
+					_defaultPalette = GenerateDefaultPalette();
+
+				return _defaultPalette;
+			}
+		}
+
+		public SCAN_Palette_Config(string filepath, string node)
+		{
+			FilePath = filepath;
+			TopNodeName = filepath + "/" + node;
+
+			if (!Load())
+			{
+				SaveDefaultPalettes();
+				Save();
+				LoadSavedCopy();
+			}
+			else
+				SCANUtil.SCANlog("Palette File Loaded");
+
+			_defaultPalette = GenerateDefaultPalette();
+		}
+
+		private SCANPalette GenerateDefaultPalette()
+		{
+			Color32[] c = new Color32[7] { (Color32)palette.xkcd_DarkPurple, (Color32)palette.xkcd_Cerulean, (Color32)palette.xkcd_ArmyGreen, (Color32)palette.xkcd_Yellow, (Color32)palette.xkcd_Red, (Color32)palette.xkcd_Magenta, (Color32)palette.xkcd_White };
+
+			return new SCANPalette(c, "Default", SCANPaletteKind.Fixed, c.Length);
+		}
+
+		private void SaveDefaultPalettes()
+		{
+			SCANUtil.SCANlog("Generating default palettes");
+
+			PaletteTypes = new List();
+
+			PaletteTypes.Add(new SCANPaletteType("Diverging"));
+			PaletteTypes.Add(new SCANPaletteType("Qualitative"));
+			PaletteTypes.Add(new SCANPaletteType("Sequential"));
+			PaletteTypes.Add(new SCANPaletteType("Fixed"));
+
+			for (int i = 0; i < PaletteTypes.Count; i++)
+				PaletteTypes[i].SaveDefaultPalettes();
+
+			OnDecodeFromConfigNode();
+		}
+
+		public SCANPaletteType GetPaletteType(SCANPaletteKind kind)
+		{
+			if (MasterPaletteTypeList.Contains(kind))
+				return MasterPaletteTypeList[kind];
+
+			if (MasterPaletteTypeList.Count > 0)
+				return MasterPaletteTypeList.At(0);
+
+			return null;
+		}
+
+		public SCANPaletteGroup GetPaletteGroup(SCANPaletteKind kind, string name)
+		{
+			for (int i = 0; i < MasterPaletteTypeList.Count; i++)
+			{
+				SCANPaletteType type = MasterPaletteTypeList.At(i);
+
+				if (type.Kind != kind)
+					continue;
+
+				SCANPaletteGroup group = type.GetPaletteGroup(name);
+
+				return group;
+			}
+
+			return null;
+		}
+
+		public SCANPaletteGroup GetPaletteGroup(string name)
+		{
+			for (int i = 0; i < MasterPaletteTypeList.Count; i++)
+			{
+				SCANPaletteType type = MasterPaletteTypeList.At(i);
+
+				SCANPaletteGroup group = type.GetPaletteGroup(name);
+
+				if (group != null)
+					return group;
+			}
+
+			return null;
+		}
+
+		public List GetPaletteList(SCANPaletteKind kind, int length)
+		{
+			for (int i = 0; i < MasterPaletteTypeList.Count; i++)
+			{
+				SCANPaletteType type = MasterPaletteTypeList.At(i);
+
+				if (type.Kind != kind)
+					continue;
+
+				return type.GetPaletteList(length);
+			}
+
+			return null;
+		}
+
+		public override void OnDecodeFromConfigNode()
+		{
+			try
+			{
+				for (int i = PaletteTypes.Count - 1; i >= 0; i--)
+				{
+					SCANPaletteType p = PaletteTypes[i];
+
+					if (p == null)
+						continue;
+
+					if (!MasterPaletteTypeList.Contains(p.Kind))
+						MasterPaletteTypeList.Add(p.Kind, p);
+				}
+			}
+			catch (Exception e)
+			{
+				SCANUtil.SCANlog("Error while loading SCANsat palettes config settings: {0}", e);
+			}
+		}
+
+		public override void OnEncodeToConfigNode()
+		{
+			try
+			{
+				PaletteTypes = MasterPaletteTypeList.Values.ToList();
+			}
+			catch (Exception e)
+			{
+				SCANUtil.SCANlog("Error while saving SCANsat palettes config data: {0}", e);
+			}
+		}
+
+	}
+}
diff --git a/SCANsat/SCAN_Palettes/SCANPalette.cs b/SCANsat/SCAN_Palettes/SCANPalette.cs
new file mode 100644
index 000000000..0e53ad6bc
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/SCANPalette.cs
@@ -0,0 +1,116 @@
+using System;
+using UnityEngine;
+using SCANsat.SCAN_Platform;
+
+namespace SCANsat.SCAN_Palettes
+{
+	public class SCANPalette : SCAN_ConfigNodeStorage
+	{
+		[Persistent]
+		private string Colors;
+
+		private int _count;
+		private int _hash;
+		private string _name;
+		private SCANPaletteKind _kind;
+		private Color32[] _colors;
+		private Color32[] _colorsReverse;
+
+		public int Count
+		{
+			get { return _count; }
+		}
+
+		public int Hash
+		{
+			get { return _hash; }
+		}
+
+		public string Name
+		{
+			get { return _name; }
+			set
+			{
+				_name = value;
+
+				_hash = (_name + _count).GetHashCode(); 
+			}
+		}
+
+		public SCANPaletteKind Kind
+		{
+			get { return _kind; }
+			set { _kind = value; }
+		}
+
+		public Color32[] ColorsArray
+		{
+			get { return _colors; }
+		}
+
+		public Color32[] ColorsReverse
+		{
+			get { return _colorsReverse; }
+		}
+
+		public SCANPalette() { }
+
+		public SCANPalette(Color32[] colors, string name, SCANPaletteKind kind, int size)
+		{
+			_name = name;
+			_count = size;
+			_kind = kind;
+			_hash = (name + size).GetHashCode();
+
+			_colors = colors;
+			_colorsReverse = new Color32[_count];
+			_colors.CopyTo(_colorsReverse, 0);
+			Array.Reverse(_colorsReverse);
+		}
+
+		public override void OnDecodeFromConfigNode()
+		{
+			string[] split = Colors.Split('|');
+
+			_count = split.Length;
+			_colors = new Color32[_count];
+
+			for (int i = 0; i < _count; i++)
+			{
+				string color = split[i];
+				Color32 c = Color.clear;
+
+				try
+				{
+					c = ConfigNode.ParseColor32(color);
+				}
+				catch (Exception e)
+				{
+					SCANUtil.SCANlog("Error while parsing SCANsat palette colors - {0}\n{1}", color, e);					
+				}
+
+				_colors[i] = c;
+			}
+
+			_colorsReverse = new Color32[_count];
+			_colors.CopyTo(_colorsReverse, 0);
+			Array.Reverse(_colorsReverse);
+		}
+
+		public override void OnEncodeToConfigNode()
+		{
+			string[] colors = new string[_colors.Length];
+
+			for (int i = 0; i < _colors.Length; i++)
+			{
+				Color32 c = _colors[i];
+
+				string s = string.Format("{0},{1},{2},{3}", c.r, c.g, c.b, c.a);
+
+				colors[i] = s;
+			}
+
+			Colors = string.Join("|", colors);
+		}
+	}
+}
diff --git a/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs b/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs
new file mode 100644
index 000000000..71092a0f8
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs
@@ -0,0 +1,137 @@
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using SCANsat.SCAN_Platform;
+
+namespace SCANsat.SCAN_Palettes
+{
+	public class SCANPaletteGroup : SCAN_ConfigNodeStorage
+	{
+		[Persistent]
+		private string PaletteName;
+		[Persistent]
+		private List Palettes = new List();
+
+		private DictionaryValueList MasterPaletteList = new DictionaryValueList();
+
+		private SCANPaletteKind _kind;
+
+		public SCANPaletteGroup() { }
+
+		public SCANPaletteGroup(string name, SCANPaletteKind kind)
+		{
+			PaletteName = name;
+			_kind = kind;
+		}
+
+		public SCANPaletteKind Kind
+		{
+			get { return _kind; }
+			set { _kind = value; }
+		}
+
+		public string _PaletteName
+		{
+			get { return PaletteName; }
+		}
+
+		public SCANPalette GetPalette(int length)
+		{
+			if (_kind == SCANPaletteKind.Fixed && MasterPaletteList.Count > 0)
+				return MasterPaletteList.At(0);
+
+			if (MasterPaletteList.Contains(length))
+				return MasterPaletteList[length];
+
+			if (MasterPaletteList.Count > 0)
+				return MasterPaletteList.At(MasterPaletteList.Count - 1);
+
+			return null;
+		}
+
+		public void SaveDefaultPalettes()
+		{
+			Palettes = new List();
+
+			int count = 1;
+
+			try
+			{
+				switch (_kind)
+				{
+					case SCANPaletteKind.Fixed:
+						var fixedPalette = typeof(FixedColorPalettes);
+						var fixedPaletteMethod = fixedPalette.GetMethod(PaletteName);
+						var fixedColorPalette = fixedPaletteMethod.Invoke(null, null);
+						Palettes.Add((SCANPalette)fixedColorPalette);
+						OnDecodeFromConfigNode();
+						return;
+					case SCANPaletteKind.Diverging:
+						count = 11;
+						break;
+					case SCANPaletteKind.Qualitative:
+						count = 12;
+						break;
+					case SCANPaletteKind.Sequential:
+						count = 9;
+						break;
+					default:
+						break;
+				}
+
+				var brewerPalette = typeof(BrewerPalettes);
+				var brewerPaletteMethod = brewerPalette.GetMethod(PaletteName);
+
+				for (int i = 3; i <= count; i++)
+				{
+					var brewerColorPalette = brewerPaletteMethod.Invoke(null, new object[] { i });
+					Palettes.Add((SCANPalette)brewerColorPalette);
+				}
+			}
+			catch (Exception e)
+			{
+				SCANUtil.SCANlog("Error Generating Color Palettes: {0}", e);
+			}
+
+			OnDecodeFromConfigNode();
+		}
+
+		public override void OnDecodeFromConfigNode()
+		{
+			try
+			{
+				for (int i = Palettes.Count - 1; i >= 0; i--)
+				{
+					SCANPalette p = Palettes[i];
+
+					if (p == null)
+						continue;
+
+					if (!MasterPaletteList.Contains(p.Count))
+						MasterPaletteList.Add(p.Count, p);
+
+					p.Name = PaletteName;
+					p.Kind = _kind;
+				}
+			}
+			catch (Exception e)
+			{
+				SCANUtil.SCANlog("Error while loading SCANsat palette config settings: {0}", e);
+			}
+		}
+
+		public override void OnEncodeToConfigNode()
+		{
+			try
+			{
+				Palettes = MasterPaletteList.Values.ToList();
+			}
+			catch (Exception e)
+			{
+				SCANUtil.SCANlog("Error while saving SCANsat palette config data: {0}", e);
+			}
+		}
+	}
+}
diff --git a/SCANsat/SCAN_Palettes/SCANPaletteKind.cs b/SCANsat/SCAN_Palettes/SCANPaletteKind.cs
new file mode 100644
index 000000000..a08001bb4
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/SCANPaletteKind.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace SCANsat.SCAN_Palettes
+{
+	public enum SCANPaletteKind
+	{
+		Diverging,
+		Qualitative,
+		Sequential,
+		Fixed,
+		Unknown,
+	}
+}
diff --git a/SCANsat/SCAN_Palettes/SCANPaletteType.cs b/SCANsat/SCAN_Palettes/SCANPaletteType.cs
new file mode 100644
index 000000000..b2f64063a
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/SCANPaletteType.cs
@@ -0,0 +1,265 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using SCANsat.SCAN_Platform;
+
+namespace SCANsat.SCAN_Palettes
+{
+	public class SCANPaletteType : SCAN_ConfigNodeStorage
+	{
+		[Persistent]
+		private string PaletteType;
+		[Persistent]
+		private List PaletteGroups = new List();
+		
+		private DictionaryValueList MasterPaletteGroupList = new DictionaryValueList();
+
+		private SCANPaletteKind _kind;
+		private Texture2D[] _paletteSwatch;
+		private int _swatchLength = -1;
+
+		public SCANPaletteType() { }
+
+		public SCANPaletteType(string type)
+		{
+			PaletteType = type;
+
+			try
+			{
+				_kind = (SCANPaletteKind)Enum.Parse(typeof(SCANPaletteKind), type);
+			}
+			catch (Exception e)
+			{
+				_kind = SCANPaletteKind.Unknown;
+				SCANUtil.SCANlog("Error assigning SCANsat palette type - Type: {0}\n{1}", type, e);
+			}
+
+		}
+
+		public SCANPaletteKind Kind
+		{
+			get { return _kind; }
+		}
+
+		public Texture2D[] PaletteSwatch
+		{
+			get { return _paletteSwatch; }
+		}
+
+		public int Count
+		{
+			get { return MasterPaletteGroupList.Count; }
+		}
+
+		public void SaveDefaultPalettes()
+		{
+			PaletteGroups = new List();
+
+			switch (_kind)
+			{
+				case SCANPaletteKind.Diverging:
+					PaletteGroups.Add(new SCANPaletteGroup("Spectral", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("RdYlGn", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("RdBu", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("PiYG", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("PRGn", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("RdYlBu", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("BrBG", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("RdGy", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("PuOr", _kind));
+					break;
+				case SCANPaletteKind.Qualitative:
+					PaletteGroups.Add(new SCANPaletteGroup("Set2", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Accent", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Set1", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Set3", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Dark2", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Paired", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Pastel2", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Pastel1", _kind));
+					break;
+				case SCANPaletteKind.Sequential:
+					PaletteGroups.Add(new SCANPaletteGroup("OrRd", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("BuPu", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("BuGn", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("YlOrBr", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("YlGn", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Reds", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("RdPu", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("YlGnBu", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("YlOrRd", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("PuRd", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("Blues", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("PuBuGn", _kind));
+					break;
+				case SCANPaletteKind.Fixed:
+					PaletteGroups.Add(new SCANPaletteGroup("blackForest", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("mars", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("departure", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("northRhine", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("wiki2", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("plumbago", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("cw1_013", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("arctic", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("mercury", _kind));
+					PaletteGroups.Add(new SCANPaletteGroup("venus", _kind));
+					break;
+				default:
+					break;
+			}
+
+			for (int i = 0; i < PaletteGroups.Count; i++)
+				PaletteGroups[i].SaveDefaultPalettes();
+
+			OnDecodeFromConfigNode();
+		}
+
+		public SCANPaletteGroup GetPaletteGroup(string name)
+		{
+			for (int i = MasterPaletteGroupList.Count - 1; i >= 0; i--)
+			{
+				SCANPaletteGroup group = MasterPaletteGroupList.At(i);
+
+				if (group._PaletteName != name)
+					continue;
+
+				return group;
+			}
+
+			return null;
+		}
+
+		public string[] GetGroupNames()
+		{
+			string[] names = new string[Count];
+
+			for (int i = 0; i < MasterPaletteGroupList.Count; i++)
+			{
+				names[i] = MasterPaletteGroupList.At(i)._PaletteName;
+			}
+
+			return names;
+		}
+
+		public SCANPaletteGroup GetFirstGroup()
+		{
+			if (MasterPaletteGroupList.Count > 0)
+				return MasterPaletteGroupList.At(0);
+
+			return null;
+		}
+
+		public List GetPaletteList(int length)
+		{
+			List palettes = new List();
+
+			for (int i = 0; i < MasterPaletteGroupList.Count; i++)
+			{
+				SCANPaletteGroup group = MasterPaletteGroupList.At(i);
+
+				SCANPalette palette = group.GetPalette(length);
+
+				if (palette != null)
+					palettes.Add(palette);
+			}
+
+			return palettes;
+		}
+
+		public Texture2D[] GenerateSwatches(int length)
+		{
+			if (_paletteSwatch == null || length != _swatchLength)
+			{
+				_paletteSwatch = new Texture2D[MasterPaletteGroupList.Count];
+
+				for (int i = 0; i < MasterPaletteGroupList.Count; i++)
+				{
+					int k = 0;
+					int m = 120;
+					int paletteSize = length;
+
+					_swatchLength = length;
+
+					if (paletteSize == 11)
+						m = 121;
+					else if (paletteSize == 18)
+						m = 126;
+					else if (paletteSize == 9)
+						m = 117;
+					else if (paletteSize == 7)
+						m = 119;
+					else if (paletteSize == 34)
+						m = 136;
+					else if (m % paletteSize != 0)
+					{
+						int s = 115;
+
+						while (s % paletteSize != 0)
+							s++;
+
+						m = s;
+					}
+
+					Texture2D t = new Texture2D(m, 1);
+
+					Color32[] pix = new Color32[m];
+					int sW = m / paletteSize;
+
+					for (int j = 0; j < m; j++)
+					{
+						if (j % sW == 0)
+							k++;
+
+						pix[j] = MasterPaletteGroupList.At(i).GetPalette(length).ColorsArray[k - 1];
+					}
+
+					t.SetPixels32(pix);
+					t.Apply();
+					_paletteSwatch[i] = t;
+				}
+				return _paletteSwatch;
+			}
+			else
+				return _paletteSwatch;
+		}
+
+		public override void OnDecodeFromConfigNode()
+		{
+			try
+			{
+				_kind = (SCANPaletteKind)Enum.Parse(typeof(SCANPaletteKind), PaletteType);
+			}
+			catch (Exception e)
+			{
+				_kind = SCANPaletteKind.Unknown;
+				SCANUtil.SCANlog("Error assigning SCANsat palette type - Type: {0}\n{1}", PaletteType, e);
+			}
+
+			try
+			{
+				for (int i = PaletteGroups.Count - 1; i >= 0; i--)
+				{
+					SCANPaletteGroup p = PaletteGroups[i];
+
+					if (p == null)
+						continue;
+
+					if (!MasterPaletteGroupList.Contains(p._PaletteName))
+						MasterPaletteGroupList.Add(p._PaletteName, p);
+
+					p.Kind = _kind;
+				}
+			}
+			catch (Exception e)
+			{
+				SCANUtil.SCANlog("Error while loading SCANsat palette config settings: {0}", e);
+			}
+		}
+
+		public override void OnEncodeToConfigNode()
+		{
+			base.OnEncodeToConfigNode();
+		}
+	}
+}

From 78ed2c40eb24a661a302f0d8e57fb794b096ac9d Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:47:51 -0400
Subject: [PATCH 12/29] Move this file

---
 SCANsat/SCAN_Palettes/Include/Original.cs | 731 ++++++++++++++++++++++
 1 file changed, 731 insertions(+)
 create mode 100644 SCANsat/SCAN_Palettes/Include/Original.cs

diff --git a/SCANsat/SCAN_Palettes/Include/Original.cs b/SCANsat/SCAN_Palettes/Include/Original.cs
new file mode 100644
index 000000000..09d88ce4d
--- /dev/null
+++ b/SCANsat/SCAN_Palettes/Include/Original.cs
@@ -0,0 +1,731 @@
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCAN Color Brewer Originals - Original Color Brewer palettes for reference and the methods for porting them to C#
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
+using System.Text.RegularExpressions;
+using Color32 = UnityEngine.Color32;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+
+namespace SCANsat.SCAN_Platform.Palettes.ColorBrewer.Include
+{
+	public class Original
+	{
+		/* REGEX INSTRUCTIONS AND EXPLANTION
+		 * In order to do this transformation systematically from the source, I
+		 * 	resorted to judicious use of regular expressions.
+		 * 
+		 * First, some (small) cosmetic things:
+		 * 
+		 * 1. Make the labels all be 2 digits (must be run twice, for some reason):
+		 * 		(?[\(\)\,])(?\d\d)(?[\(\)\,])
+		 * 		${begin}0${twodigit}${end}
+		 * 		xn
+		 * 
+		 * 2. Prefix all 1-digit color values with two 0's:
+		 * 		(?[\(\)\,])(?\d)(?[\(\)\,])
+		 * 		${begin}00${onedigit}${end}
+		 * 		xn
+		 * 
+		 * 3. Prefix all 1-digit palette size values with a 0:
+		 * 		(?[\s]+)(?\d)(?[:])
+		 * 		${begin}0${onedigit}${end}
+		 * 		xn
+		 * 
+		 * Using this, we can transform the input (which is not C# friendly in any way) to something 
+		 * 	more satisfactory to our needs.
+		 * 
+		 * NOTE: The index (ie, the 3: or 4: before each line) is redundant; it can be inferred
+		 * 	from the length of the color lists themselves.
+		 * 
+		 * Now, for processing the overall file:
+		 * 
+		 * 4. This regular expression matches key(int)-value(Color array), line by line:
+		 * 		(?\s+) (?\d+)(?\:)\ (?\[)(?[^\[.]+) (?\])(?,)
+		 * 		${indent} case ${size}: c = new[] {${arr}}; break;
+		 * 		nx
+		 * 	
+		 * 		
+		 * 4a.	Other alternative replace regexes I considered were:
+		 * 		${indent} ${size}${op}${open}${arr}${close}${delim}
+		 * 		${indent} Color32[] c${size} = {${arr}};
+		 * 
+		 * 5. [RGB to new Color32] I used the following regular expression:
+		 * 		'rgb \( (?\d+), (?\d+), (?\d+) \)'
+		 * 		RGB(${r},${g},${b})
+		 * 		nx
+		 * 
+		 * 
+		 * 6. This expression converts the name into a C# method decleration:
+		 * 		^(?
\s+)(?[\w]+):\s+\{(?\s+)
+		 * 		${pre}public static Color32[] ${name} (int size) {${post}Color32[] c;${post}switch (size) {${post}
+		 *		mn
+		 * 
+		 * 7. For now, let's just get rid of all the properties:
+		 * 		(?\s+)('properties':\ {(?\n)[^}]+})
+		 * 		${indent} default: goto case 03;${indent}}
+		 * 		nx
+		 * 
+		 * 7a. Convert the properties themselves into var < > = <>:
+		 * 		'(?\w+)'(?:)(?\ )(?[^\n].+)
+		 * 		var @${key} = ${value}
+		 * 		nx
+		 * 
+		 * 8. Get rid of the starting var colorbrewer =
+		 * 		^var colorbrewer = {(?\s+)
+		 * 		 ${n}
+		 * 
+		 * 9. Change "}," to end the methods.
+		 * 
+		 * 10. Manually fixup the very last }, so that it has a return after it. :(
+		 */
+
+		public static void Main () {
+			string input = fromText();
+
+			var nx = RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture;
+			var mn = RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace;
+
+			var one		= new Regex(@"(?[\(\)\,])(?\d\d)(?[\(\)\,])",nx);
+			var two		= new Regex(@"(?[\(\)\,])(?\d)(?[\(\)\,])",nx);
+			var three	= new Regex(@"(?[\s]+)(?\d)(?[:])",nx);
+			var four	= new Regex(@"(?\s+) (?\d+)(?\:)\ (?\[)(?[^\[.]+) (?\])(?,)",nx);
+			var five	= new Regex(@"'rgb \( (?\d+), (?\d+), (?\d+) \)'",nx);
+			var six		= new Regex(@"^(?
\s+)(?[\w]+):\s+\{(?\s+)",mn);
+			var sevenA	= new Regex(@"'(?\w+)'(?:)(?\ )(?[^\n].+)",nx);
+			var sevenB	= new Regex(@"\[(?\d)\]",nx);
+			var sevenC	= new Regex(@"(?\s+)('properties':\ {(?\n)(?[^}]+)})",nx);
+			var eight	= new Regex(@"^var colorbrewer = {(?\s+)");
+			var nine	= new Regex(@"(?\s+)(?},)(?\n)",nx);
+
+			var after1	= one.Replace(input		,@"${begin}0${twodigit}${end}");
+			var after1a	= one.Replace(after1	,@"${begin}0${twodigit}${end}");
+			var after2	= two.Replace(after1a	,@"${begin}00${onedigit}${end}");
+			var after3	= three.Replace(after2	,@"${begin}0${onedigit}${end}");
+			var after4	= four.Replace(after3	,@"${indent} case ${size}: c = new[] {${arr}}; break;");
+			var after5	= five.Replace(after4	,@"RGB(${r},${g},${b})");
+			var after6	= six.Replace(after5	,@"${pre}public static Palette ${name} (int size) {${post}Color32[] c;${post}switch (size) {${post}");
+			var after7a	= sevenA.Replace(after6	,@"var @${key} = ${value};");
+			var after7b	= sevenB.Replace(after7a,@"[${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}, ${d}]");
+			var after7c	= sevenC.Replace(after7b,@"${indent} default: goto case 03;${indent}}${n}${stuff}");
+			var after8	= eight.Replace(after7c	,@"${n}");
+			var after9 	= nine.Replace(after8	,@"${indent}return new Palette(c, @type, (Palette.Is) @blind[size-3], (Palette.Is) @print[size-3], (Palette.Is) @xerox[size-3], (Palette.Is) @panel[size-3]);${indent}}${n}");
+
+
+			IDictionary map = new Dictionary() {
+				{"'div'",	"Palette.Kind.Diverging"},
+				{"'seq'",	"Palette.Kind.Sequential"},
+				{"'qual'",	"Palette.Kind.Qualitative"},
+				{"= [",		"= new[] {"},
+				{"],;",		"};"},
+				{"];",		"};"},
+				{",;",		";"},
+				{"copy",	"xerox"},
+				{"screen",	"panel"},
+			};
+			var mapRegex = new Regex(String.Join ("|", (string[])map.Keys.Select (k => Regex.Escape (k))));
+			var afterMap = mapRegex.Replace(after9, m => map [m.Value]);
+			Console.WriteLine(afterMap);
+		}
+	
+		public static string fromText() {
+			return 
+@"var colorbrewer = {
+    /*** Diverging ***/
+    Spectral: {
+      3: ['rgb(252,141,89)', 'rgb(255,255,191)', 'rgb(153,213,148)'],
+      4: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(171,221,164)', 'rgb(43,131,186)'],
+      5: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(255,255,191)', 'rgb(171,221,164)', 'rgb(43,131,186)'],
+      6: ['rgb(213,62,79)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(230,245,152)', 'rgb(153,213,148)', 'rgb(50,136,189)'],
+      7: ['rgb(213,62,79)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(230,245,152)', 'rgb(153,213,148)', 'rgb(50,136,189)'],
+      8: ['rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)'],
+      9: ['rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)'],
+      10: ['rgb(158,1,66)', 'rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)', 'rgb(94,79,162)'],
+      11: ['rgb(158,1,66)', 'rgb(213,62,79)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(230,245,152)', 'rgb(171,221,164)', 'rgb(102,194,165)', 'rgb(50,136,189)', 'rgb(94,79,162)'],
+      'properties': {
+        'type': 'div',
+        'blind': [2, 2, 2, 0, 0, 0, 0, 0, 0],
+        'print': [1, 1, 1, 0, 0, 0, 0, 0, 0],
+        'copy': [1, 1, 1, 0, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 2, 0, 0, 0, 0, 0, 0]
+      }
+    },
+    RdYlGn: {
+      3: ['rgb(252,141,89)', 'rgb(255,255,191)', 'rgb(145,207,96)'],
+      4: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(166,217,106)', 'rgb(26,150,65)'],
+      5: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(255,255,191)', 'rgb(166,217,106)', 'rgb(26,150,65)'],
+      6: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(217,239,139)', 'rgb(145,207,96)', 'rgb(26,152,80)'],
+      7: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(217,239,139)', 'rgb(145,207,96)', 'rgb(26,152,80)'],
+      8: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)'],
+      9: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)'],
+      10: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)', 'rgb(0,104,55)'],
+      11: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,139)', 'rgb(255,255,191)', 'rgb(217,239,139)', 'rgb(166,217,106)', 'rgb(102,189,99)', 'rgb(26,152,80)', 'rgb(0,104,55)'],
+      'properties': {
+        'type': 'div',
+        'blind': [2, 2, 2, 0, 0, 0, 0, 0, 0],
+        'print': [1, 1, 1, 2, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 1, 0, 0, 0, 0, 0, 0]
+      }
+    },
+    RdBu: {
+      3: ['rgb(239,138,98)', 'rgb(247,247,247)', 'rgb(103,169,207)'],
+      4: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(146,197,222)', 'rgb(5,113,176)'],
+      5: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(247,247,247)', 'rgb(146,197,222)', 'rgb(5,113,176)'],
+      6: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(209,229,240)', 'rgb(103,169,207)', 'rgb(33,102,172)'],
+      7: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(247,247,247)', 'rgb(209,229,240)', 'rgb(103,169,207)', 'rgb(33,102,172)'],
+      8: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)'],
+      9: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(247,247,247)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)'],
+      10: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)', 'rgb(5,48,97)'],
+      11: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(247,247,247)', 'rgb(209,229,240)', 'rgb(146,197,222)', 'rgb(67,147,195)', 'rgb(33,102,172)', 'rgb(5,48,97)'],
+      'properties': {
+        'type': 'div',
+        'blind': [1],
+        'print': [1, 1, 1, 1, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 1, 0, 0, 0, 0, 0, 0]
+      }
+    },
+    PiYG: {
+      3: ['rgb(233,163,201)', 'rgb(247,247,247)', 'rgb(161,215,106)'],
+      4: ['rgb(208,28,139)', 'rgb(241,182,218)', 'rgb(184,225,134)', 'rgb(77,172,38)'],
+      5: ['rgb(208,28,139)', 'rgb(241,182,218)', 'rgb(247,247,247)', 'rgb(184,225,134)', 'rgb(77,172,38)'],
+      6: ['rgb(197,27,125)', 'rgb(233,163,201)', 'rgb(253,224,239)', 'rgb(230,245,208)', 'rgb(161,215,106)', 'rgb(77,146,33)'],
+      7: ['rgb(197,27,125)', 'rgb(233,163,201)', 'rgb(253,224,239)', 'rgb(247,247,247)', 'rgb(230,245,208)', 'rgb(161,215,106)', 'rgb(77,146,33)'],
+      8: ['rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)'],
+      9: ['rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(247,247,247)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)'],
+      10: ['rgb(142,1,82)', 'rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)', 'rgb(39,100,25)'],
+      11: ['rgb(142,1,82)', 'rgb(197,27,125)', 'rgb(222,119,174)', 'rgb(241,182,218)', 'rgb(253,224,239)', 'rgb(247,247,247)', 'rgb(230,245,208)', 'rgb(184,225,134)', 'rgb(127,188,65)', 'rgb(77,146,33)', 'rgb(39,100,25)'],
+      'properties': {
+        'type': 'div',
+        'blind': [1],
+        'print': [1, 1, 2, 0, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 2, 0, 0, 0, 0, 0, 0]
+      }
+    },
+    PRGn: {
+      3: ['rgb(175,141,195)', 'rgb(247,247,247)', 'rgb(127,191,123)'],
+      4: ['rgb(123,50,148)', 'rgb(194,165,207)', 'rgb(166,219,160)', 'rgb(0,136,55)'],
+      5: ['rgb(123,50,148)', 'rgb(194,165,207)', 'rgb(247,247,247)', 'rgb(166,219,160)', 'rgb(0,136,55)'],
+      6: ['rgb(118,42,131)', 'rgb(175,141,195)', 'rgb(231,212,232)', 'rgb(217,240,211)', 'rgb(127,191,123)', 'rgb(27,120,55)'],
+      7: ['rgb(118,42,131)', 'rgb(175,141,195)', 'rgb(231,212,232)', 'rgb(247,247,247)', 'rgb(217,240,211)', 'rgb(127,191,123)', 'rgb(27,120,55)'],
+      8: ['rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)'],
+      9: ['rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(247,247,247)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)'],
+      10: ['rgb(64,0,75)', 'rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)', 'rgb(0,68,27)'],
+      11: ['rgb(64,0,75)', 'rgb(118,42,131)', 'rgb(153,112,171)', 'rgb(194,165,207)', 'rgb(231,212,232)', 'rgb(247,247,247)', 'rgb(217,240,211)', 'rgb(166,219,160)', 'rgb(90,174,97)', 'rgb(27,120,55)', 'rgb(0,68,27)'],
+      'properties': {
+        'type': 'div',
+        'blind': [1],
+        'print': [1, 1, 1, 1, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 2, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    RdYlBu: {
+      3: ['rgb(252,141,89)', 'rgb(255,255,191)', 'rgb(145,191,219)'],
+      4: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(171,217,233)', 'rgb(44,123,182)'],
+      5: ['rgb(215,25,28)', 'rgb(253,174,97)', 'rgb(255,255,191)', 'rgb(171,217,233)', 'rgb(44,123,182)'],
+      6: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,144)', 'rgb(224,243,248)', 'rgb(145,191,219)', 'rgb(69,117,180)'],
+      7: ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(254,224,144)', 'rgb(255,255,191)', 'rgb(224,243,248)', 'rgb(145,191,219)', 'rgb(69,117,180)'],
+      8: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)'],
+      9: ['rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(255,255,191)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)'],
+      10: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)', 'rgb(49,54,149)'],
+      11: ['rgb(165,0,38)', 'rgb(215,48,39)', 'rgb(244,109,67)', 'rgb(253,174,97)', 'rgb(254,224,144)', 'rgb(255,255,191)', 'rgb(224,243,248)', 'rgb(171,217,233)', 'rgb(116,173,209)', 'rgb(69,117,180)', 'rgb(49,54,149)'],
+      'properties': {
+        'type': 'div',
+        'blind': [1],
+        'print': [1, 1, 1, 1, 2, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    BrBG: {
+      3: ['rgb(216,179,101)', 'rgb(245,245,245)', 'rgb(90,180,172)'],
+      4: ['rgb(166,97,26)', 'rgb(223,194,125)', 'rgb(128,205,193)', 'rgb(1,133,113)'],
+      5: ['rgb(166,97,26)', 'rgb(223,194,125)', 'rgb(245,245,245)', 'rgb(128,205,193)', 'rgb(1,133,113)'],
+      6: ['rgb(140,81,10)', 'rgb(216,179,101)', 'rgb(246,232,195)', 'rgb(199,234,229)', 'rgb(90,180,172)', 'rgb(1,102,94)'],
+      7: ['rgb(140,81,10)', 'rgb(216,179,101)', 'rgb(246,232,195)', 'rgb(245,245,245)', 'rgb(199,234,229)', 'rgb(90,180,172)', 'rgb(1,102,94)'],
+      8: ['rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)'],
+      9: ['rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(245,245,245)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)'],
+      10: ['rgb(84,48,5)', 'rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)', 'rgb(0,60,48)'],
+      11: ['rgb(84,48,5)', 'rgb(140,81,10)', 'rgb(191,129,45)', 'rgb(223,194,125)', 'rgb(246,232,195)', 'rgb(245,245,245)', 'rgb(199,234,229)', 'rgb(128,205,193)', 'rgb(53,151,143)', 'rgb(1,102,94)', 'rgb(0,60,48)'],
+      'properties': {
+        'type': 'div',
+        'blind': [1],
+        'print': [1, 1, 1, 1, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 1, 1, 0, 0, 0, 0, 0]
+      }
+    },
+    RdGy: {
+      3: ['rgb(239,138,98)', 'rgb(255,255,255)', 'rgb(153,153,153)'],
+      4: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(186,186,186)', 'rgb(64,64,64)'],
+      5: ['rgb(202,0,32)', 'rgb(244,165,130)', 'rgb(255,255,255)', 'rgb(186,186,186)', 'rgb(64,64,64)'],
+      6: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(224,224,224)', 'rgb(153,153,153)', 'rgb(77,77,77)'],
+      7: ['rgb(178,24,43)', 'rgb(239,138,98)', 'rgb(253,219,199)', 'rgb(255,255,255)', 'rgb(224,224,224)', 'rgb(153,153,153)', 'rgb(77,77,77)'],
+      8: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)'],
+      9: ['rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(255,255,255)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)'],
+      10: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)', 'rgb(26,26,26)'],
+      11: ['rgb(103,0,31)', 'rgb(178,24,43)', 'rgb(214,96,77)', 'rgb(244,165,130)', 'rgb(253,219,199)', 'rgb(255,255,255)', 'rgb(224,224,224)', 'rgb(186,186,186)', 'rgb(135,135,135)', 'rgb(77,77,77)', 'rgb(26,26,26)'],
+      'properties': {
+        'type': 'div',
+        'blind': [2],
+        'print': [1, 1, 1, 2, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [1, 1, 2, 0, 0, 0, 0, 0, 0]
+      }
+    },
+    PuOr: {
+      3: ['rgb(241,163,64)', 'rgb(247,247,247)', 'rgb(153,142,195)'],
+      4: ['rgb(230,97,1)', 'rgb(253,184,99)', 'rgb(178,171,210)', 'rgb(94,60,153)'],
+      5: ['rgb(230,97,1)', 'rgb(253,184,99)', 'rgb(247,247,247)', 'rgb(178,171,210)', 'rgb(94,60,153)'],
+      6: ['rgb(179,88,6)', 'rgb(241,163,64)', 'rgb(254,224,182)', 'rgb(216,218,235)', 'rgb(153,142,195)', 'rgb(84,39,136)'],
+      7: ['rgb(179,88,6)', 'rgb(241,163,64)', 'rgb(254,224,182)', 'rgb(247,247,247)', 'rgb(216,218,235)', 'rgb(153,142,195)', 'rgb(84,39,136)'],
+      8: ['rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)'],
+      9: ['rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(247,247,247)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)'],
+      10: ['rgb(127,59,8)', 'rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)', 'rgb(45,0,75)'],
+      11: ['rgb(127,59,8)', 'rgb(179,88,6)', 'rgb(224,130,20)', 'rgb(253,184,99)', 'rgb(254,224,182)', 'rgb(247,247,247)', 'rgb(216,218,235)', 'rgb(178,171,210)', 'rgb(128,115,172)', 'rgb(84,39,136)', 'rgb(45,0,75)'],
+      'properties': {
+        'type': 'div',
+        'blind': [1],
+        'print': [1, 1, 2, 2, 0, 0, 0, 0, 0],
+        'copy': [1, 1, 0, 0, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 1, 0, 0, 0, 0, 0]
+      }
+    },
+    /*** Qualitative ***/
+    Set2: {
+      3: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)'],
+      4: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)'],
+      5: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)'],
+      6: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)', 'rgb(255,217,47)'],
+      7: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)', 'rgb(255,217,47)', 'rgb(229,196,148)'],
+      8: ['rgb(102,194,165)', 'rgb(252,141,98)', 'rgb(141,160,203)', 'rgb(231,138,195)', 'rgb(166,216,84)', 'rgb(255,217,47)', 'rgb(229,196,148)', 'rgb(179,179,179)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [1, 2, 2, 2, 0, 0],
+        'print': [1, 1, 1, 2, 2, 2],
+        'copy': [0],
+        'screen': [1, 1, 2, 2, 2, 2]
+      }
+    },
+    Accent: {
+      3: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)'],
+      4: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)'],
+      5: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)'],
+      6: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)', 'rgb(240,2,127)'],
+      7: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)', 'rgb(240,2,127)', 'rgb(191,91,23)'],
+      8: ['rgb(127,201,127)', 'rgb(190,174,212)', 'rgb(253,192,134)', 'rgb(255,255,153)', 'rgb(56,108,176)', 'rgb(240,2,127)', 'rgb(191,91,23)', 'rgb(102,102,102)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [2, 0, 0, 0, 0, 0],
+        'print': [1, 1, 2, 2, 2, 2],
+        'copy': [0],
+        'screen': [1, 1, 1, 2, 2, 2]
+      }
+    },
+    Set1: {
+      3: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)'],
+      4: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)'],
+      5: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)'],
+      6: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)'],
+      7: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)'],
+      8: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)', 'rgb(247,129,191)'],
+      9: ['rgb(228,26,28)', 'rgb(55,126,184)', 'rgb(77,175,74)', 'rgb(152,78,163)', 'rgb(255,127,0)', 'rgb(255,255,51)', 'rgb(166,86,40)', 'rgb(247,129,191)', 'rgb(153,153,153)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [2],
+        'print': [1],
+        'copy': [0],
+        'screen': [1]
+      }
+    },
+    Set3: {
+      3: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)'],
+      4: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)'],
+      5: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)'],
+      6: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)'],
+      7: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)'],
+      8: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)'],
+      9: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)'],
+      10: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)', 'rgb(188,128,189)'],
+      11: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)', 'rgb(188,128,189)', 'rgb(204,235,197)'],
+      12: ['rgb(141,211,199)', 'rgb(255,255,179)', 'rgb(190,186,218)', 'rgb(251,128,114)', 'rgb(128,177,211)', 'rgb(253,180,98)', 'rgb(179,222,105)', 'rgb(252,205,229)', 'rgb(217,217,217)', 'rgb(188,128,189)', 'rgb(204,235,197)', 'rgb(255,237,111)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [2, 2, 0, 0, 0, 0, 0, 0, 0, 0],
+        'print': [1, 1, 1, 1, 1, 1, 2, 0, 0, 0],
+        'copy': [1, 2, 2, 2, 2, 2, 2, 0, 0, 0],
+        'screen': [1, 1, 1, 2, 2, 2, 0, 0, 0, 0]
+      }
+    },
+    Dark2: {
+      3: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)'],
+      4: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)'],
+      5: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)'],
+      6: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)', 'rgb(230,171,2)'],
+      7: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)', 'rgb(230,171,2)', 'rgb(166,118,29)'],
+      8: ['rgb(27,158,119)', 'rgb(217,95,2)', 'rgb(117,112,179)', 'rgb(231,41,138)', 'rgb(102,166,30)', 'rgb(230,171,2)', 'rgb(166,118,29)', 'rgb(102,102,102)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [1, 2, 2, 2, 0, 0],
+        'print': [1],
+        'copy': [0],
+        'screen': [1]
+      }
+    },
+    Paired: {
+      3: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)'],
+      4: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)'],
+      5: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)'],
+      6: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)'],
+      7: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)'],
+      8: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)'],
+      9: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)'],
+      10: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)', 'rgb(106,61,154)'],
+      11: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)', 'rgb(106,61,154)', 'rgb(255,255,153)'],
+      12: ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', 'rgb(255,127,0)', 'rgb(202,178,214)', 'rgb(106,61,154)', 'rgb(255,255,153)', 'rgb(177,89,40)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [1, 1, 2, 2, 2, 2, 0, 0, 0],
+        'print': [1, 1, 1, 1, 1, 2, 2, 2, 2],
+        'copy': [0],
+        'screen': [1, 1, 1, 1, 1, 1, 1, 1, 2]
+      }
+    },
+    Pastel2: {
+      3: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)'],
+      4: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)'],
+      5: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)'],
+      6: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)', 'rgb(255,242,174)'],
+      7: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)', 'rgb(255,242,174)', 'rgb(241,226,204)'],
+      8: ['rgb(179,226,205)', 'rgb(253,205,172)', 'rgb(203,213,232)', 'rgb(244,202,228)', 'rgb(230,245,201)', 'rgb(255,242,174)', 'rgb(241,226,204)', 'rgb(204,204,204)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [2, 0, 0, 0, 0, 0],
+        'print': [2, 0, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [2, 2, 0, 0, 0, 0]
+      }
+    },
+    Pastel1: {
+      3: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)'],
+      4: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)'],
+      5: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)'],
+      6: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)'],
+      7: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)', 'rgb(229,216,189)'],
+      8: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)', 'rgb(229,216,189)', 'rgb(253,218,236)'],
+      9: ['rgb(251,180,174)', 'rgb(179,205,227)', 'rgb(204,235,197)', 'rgb(222,203,228)', 'rgb(254,217,166)', 'rgb(255,255,204)', 'rgb(229,216,189)', 'rgb(253,218,236)', 'rgb(242,242,242)'],
+      'properties': {
+        'type': 'qual',
+        'blind': [2, 0, 0, 0, 0, 0, 0],
+        'print': [2, 2, 2, 0, 0, 0, 0],
+        'copy': [0],
+        'screen': [2, 2, 2, 2, 0, 0, 0]
+      }
+    },
+    /*** Sequential ***/
+    OrRd: {
+      3: ['rgb(254,232,200)', 'rgb(253,187,132)', 'rgb(227,74,51)'],
+      4: ['rgb(254,240,217)', 'rgb(253,204,138)', 'rgb(252,141,89)', 'rgb(215,48,31)'],
+      5: ['rgb(254,240,217)', 'rgb(253,204,138)', 'rgb(252,141,89)', 'rgb(227,74,51)', 'rgb(179,0,0)'],
+      6: ['rgb(254,240,217)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(227,74,51)', 'rgb(179,0,0)'],
+      7: ['rgb(254,240,217)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(239,101,72)', 'rgb(215,48,31)', 'rgb(153,0,0)'],
+      8: ['rgb(255,247,236)', 'rgb(254,232,200)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(239,101,72)', 'rgb(215,48,31)', 'rgb(153,0,0)'],
+      9: ['rgb(255,247,236)', 'rgb(254,232,200)', 'rgb(253,212,158)', 'rgb(253,187,132)', 'rgb(252,141,89)', 'rgb(239,101,72)', 'rgb(215,48,31)', 'rgb(179,0,0)', 'rgb(127,0,0)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 0, 0, 0, 0, 0],
+        'copy': [1, 1, 2, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 0, 0, 0, 0]
+      }
+    },
+    PuBu: {
+      3: ['rgb(236,231,242)', 'rgb(166,189,219)', 'rgb(43,140,190)'],
+      4: ['rgb(241,238,246)', 'rgb(189,201,225)', 'rgb(116,169,207)', 'rgb(5,112,176)'],
+      5: ['rgb(241,238,246)', 'rgb(189,201,225)', 'rgb(116,169,207)', 'rgb(43,140,190)', 'rgb(4,90,141)'],
+      6: ['rgb(241,238,246)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(43,140,190)', 'rgb(4,90,141)'],
+      7: ['rgb(241,238,246)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(54,144,192)', 'rgb(5,112,176)', 'rgb(3,78,123)'],
+      8: ['rgb(255,247,251)', 'rgb(236,231,242)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(54,144,192)', 'rgb(5,112,176)', 'rgb(3,78,123)'],
+      9: ['rgb(255,247,251)', 'rgb(236,231,242)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(116,169,207)', 'rgb(54,144,192)', 'rgb(5,112,176)', 'rgb(4,90,141)', 'rgb(2,56,88)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 2, 2, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 2, 0, 0, 0, 0]
+      }
+    },
+    BuPu: {
+      3: ['rgb(224,236,244)', 'rgb(158,188,218)', 'rgb(136,86,167)'],
+      4: ['rgb(237,248,251)', 'rgb(179,205,227)', 'rgb(140,150,198)', 'rgb(136,65,157)'],
+      5: ['rgb(237,248,251)', 'rgb(179,205,227)', 'rgb(140,150,198)', 'rgb(136,86,167)', 'rgb(129,15,124)'],
+      6: ['rgb(237,248,251)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(136,86,167)', 'rgb(129,15,124)'],
+      7: ['rgb(237,248,251)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(140,107,177)', 'rgb(136,65,157)', 'rgb(110,1,107)'],
+      8: ['rgb(247,252,253)', 'rgb(224,236,244)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(140,107,177)', 'rgb(136,65,157)', 'rgb(110,1,107)'],
+      9: ['rgb(247,252,253)', 'rgb(224,236,244)', 'rgb(191,211,230)', 'rgb(158,188,218)', 'rgb(140,150,198)', 'rgb(140,107,177)', 'rgb(136,65,157)', 'rgb(129,15,124)', 'rgb(77,0,75)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 2, 2, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 0, 0, 0, 0]
+      }
+    },
+    Oranges: {
+      3: ['rgb(254,230,206)', 'rgb(253,174,107)', 'rgb(230,85,13)'],
+      4: ['rgb(254,237,222)', 'rgb(253,190,133)', 'rgb(253,141,60)', 'rgb(217,71,1)'],
+      5: ['rgb(254,237,222)', 'rgb(253,190,133)', 'rgb(253,141,60)', 'rgb(230,85,13)', 'rgb(166,54,3)'],
+      6: ['rgb(254,237,222)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(230,85,13)', 'rgb(166,54,3)'],
+      7: ['rgb(254,237,222)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(241,105,19)', 'rgb(217,72,1)', 'rgb(140,45,4)'],
+      8: ['rgb(255,245,235)', 'rgb(254,230,206)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(241,105,19)', 'rgb(217,72,1)', 'rgb(140,45,4)'],
+      9: ['rgb(255,245,235)', 'rgb(254,230,206)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(241,105,19)', 'rgb(217,72,1)', 'rgb(166,54,3)', 'rgb(127,39,4)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 2, 0, 0, 0, 0, 0],
+        'copy': [1, 2, 2, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 0, 0, 0, 0]
+      }
+    },
+    BuGn: {
+      3: ['rgb(229,245,249)', 'rgb(153,216,201)', 'rgb(44,162,95)'],
+      4: ['rgb(237,248,251)', 'rgb(178,226,226)', 'rgb(102,194,164)', 'rgb(35,139,69)'],
+      5: ['rgb(237,248,251)', 'rgb(178,226,226)', 'rgb(102,194,164)', 'rgb(44,162,95)', 'rgb(0,109,44)'],
+      6: ['rgb(237,248,251)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(44,162,95)', 'rgb(0,109,44)'],
+      7: ['rgb(237,248,251)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(65,174,118)', 'rgb(35,139,69)', 'rgb(0,88,36)'],
+      8: ['rgb(247,252,253)', 'rgb(229,245,249)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(65,174,118)', 'rgb(35,139,69)', 'rgb(0,88,36)'],
+      9: ['rgb(247,252,253)', 'rgb(229,245,249)', 'rgb(204,236,230)', 'rgb(153,216,201)', 'rgb(102,194,164)', 'rgb(65,174,118)', 'rgb(35,139,69)', 'rgb(0,109,44)', 'rgb(0,68,27)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 2, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    YlOrBr: {
+      3: ['rgb(255,247,188)', 'rgb(254,196,79)', 'rgb(217,95,14)'],
+      4: ['rgb(255,255,212)', 'rgb(254,217,142)', 'rgb(254,153,41)', 'rgb(204,76,2)'],
+      5: ['rgb(255,255,212)', 'rgb(254,217,142)', 'rgb(254,153,41)', 'rgb(217,95,14)', 'rgb(153,52,4)'],
+      6: ['rgb(255,255,212)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(217,95,14)', 'rgb(153,52,4)'],
+      7: ['rgb(255,255,212)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(236,112,20)', 'rgb(204,76,2)', 'rgb(140,45,4)'],
+      8: ['rgb(255,255,229)', 'rgb(255,247,188)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(236,112,20)', 'rgb(204,76,2)', 'rgb(140,45,4)'],
+      9: ['rgb(255,255,229)', 'rgb(255,247,188)', 'rgb(254,227,145)', 'rgb(254,196,79)', 'rgb(254,153,41)', 'rgb(236,112,20)', 'rgb(204,76,2)', 'rgb(153,52,4)', 'rgb(102,37,6)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 2, 0, 0, 0, 0],
+        'copy': [1, 2, 2, 0, 0, 0, 0],
+        'screen': [1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    YlGn: {
+      3: ['rgb(247,252,185)', 'rgb(173,221,142)', 'rgb(49,163,84)'],
+      4: ['rgb(255,255,204)', 'rgb(194,230,153)', 'rgb(120,198,121)', 'rgb(35,132,67)'],
+      5: ['rgb(255,255,204)', 'rgb(194,230,153)', 'rgb(120,198,121)', 'rgb(49,163,84)', 'rgb(0,104,55)'],
+      6: ['rgb(255,255,204)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(49,163,84)', 'rgb(0,104,55)'],
+      7: ['rgb(255,255,204)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(65,171,93)', 'rgb(35,132,67)', 'rgb(0,90,50)'],
+      8: ['rgb(255,255,229)', 'rgb(247,252,185)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(65,171,93)', 'rgb(35,132,67)', 'rgb(0,90,50)'],
+      9: ['rgb(255,255,229)', 'rgb(247,252,185)', 'rgb(217,240,163)', 'rgb(173,221,142)', 'rgb(120,198,121)', 'rgb(65,171,93)', 'rgb(35,132,67)', 'rgb(0,104,55)', 'rgb(0,69,41)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 1, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 0, 0, 0, 0]
+      }
+    },
+    Reds: {
+      3: ['rgb(254,224,210)', 'rgb(252,146,114)', 'rgb(222,45,38)'],
+      4: ['rgb(254,229,217)', 'rgb(252,174,145)', 'rgb(251,106,74)', 'rgb(203,24,29)'],
+      5: ['rgb(254,229,217)', 'rgb(252,174,145)', 'rgb(251,106,74)', 'rgb(222,45,38)', 'rgb(165,15,21)'],
+      6: ['rgb(254,229,217)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(222,45,38)', 'rgb(165,15,21)'],
+      7: ['rgb(254,229,217)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(239,59,44)', 'rgb(203,24,29)', 'rgb(153,0,13)'],
+      8: ['rgb(255,245,240)', 'rgb(254,224,210)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(239,59,44)', 'rgb(203,24,29)', 'rgb(153,0,13)'],
+      9: ['rgb(255,245,240)', 'rgb(254,224,210)', 'rgb(252,187,161)', 'rgb(252,146,114)', 'rgb(251,106,74)', 'rgb(239,59,44)', 'rgb(203,24,29)', 'rgb(165,15,21)', 'rgb(103,0,13)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 2, 2, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    RdPu: {
+      3: ['rgb(253,224,221)', 'rgb(250,159,181)', 'rgb(197,27,138)'],
+      4: ['rgb(254,235,226)', 'rgb(251,180,185)', 'rgb(247,104,161)', 'rgb(174,1,126)'],
+      5: ['rgb(254,235,226)', 'rgb(251,180,185)', 'rgb(247,104,161)', 'rgb(197,27,138)', 'rgb(122,1,119)'],
+      6: ['rgb(254,235,226)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(197,27,138)', 'rgb(122,1,119)'],
+      7: ['rgb(254,235,226)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(221,52,151)', 'rgb(174,1,126)', 'rgb(122,1,119)'],
+      8: ['rgb(255,247,243)', 'rgb(253,224,221)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(221,52,151)', 'rgb(174,1,126)', 'rgb(122,1,119)'],
+      9: ['rgb(255,247,243)', 'rgb(253,224,221)', 'rgb(252,197,192)', 'rgb(250,159,181)', 'rgb(247,104,161)', 'rgb(221,52,151)', 'rgb(174,1,126)', 'rgb(122,1,119)', 'rgb(73,0,106)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 1, 2, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 0, 0, 0, 0]
+      }
+    },
+    Greens: {
+      3: ['rgb(229,245,224)', 'rgb(161,217,155)', 'rgb(49,163,84)'],
+      4: ['rgb(237,248,233)', 'rgb(186,228,179)', 'rgb(116,196,118)', 'rgb(35,139,69)'],
+      5: ['rgb(237,248,233)', 'rgb(186,228,179)', 'rgb(116,196,118)', 'rgb(49,163,84)', 'rgb(0,109,44)'],
+      6: ['rgb(237,248,233)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(49,163,84)', 'rgb(0,109,44)'],
+      7: ['rgb(237,248,233)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(65,171,93)', 'rgb(35,139,69)', 'rgb(0,90,50)'],
+      8: ['rgb(247,252,245)', 'rgb(229,245,224)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(65,171,93)', 'rgb(35,139,69)', 'rgb(0,90,50)'],
+      9: ['rgb(247,252,245)', 'rgb(229,245,224)', 'rgb(199,233,192)', 'rgb(161,217,155)', 'rgb(116,196,118)', 'rgb(65,171,93)', 'rgb(35,139,69)', 'rgb(0,109,44)', 'rgb(0,68,27)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 0, 0, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    YlGnBu: {
+      3: ['rgb(237,248,177)', 'rgb(127,205,187)', 'rgb(44,127,184)'],
+      4: ['rgb(255,255,204)', 'rgb(161,218,180)', 'rgb(65,182,196)', 'rgb(34,94,168)'],
+      5: ['rgb(255,255,204)', 'rgb(161,218,180)', 'rgb(65,182,196)', 'rgb(44,127,184)', 'rgb(37,52,148)'],
+      6: ['rgb(255,255,204)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(44,127,184)', 'rgb(37,52,148)'],
+      7: ['rgb(255,255,204)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(12,44,132)'],
+      8: ['rgb(255,255,217)', 'rgb(237,248,177)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(12,44,132)'],
+      9: ['rgb(255,255,217)', 'rgb(237,248,177)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(37,52,148)', 'rgb(8,29,88)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 1, 2, 2, 2, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 2, 0, 0, 0, 0]
+      }
+    },
+    Purples: {
+      3: ['rgb(239,237,245)', 'rgb(188,189,220)', 'rgb(117,107,177)'],
+      4: ['rgb(242,240,247)', 'rgb(203,201,226)', 'rgb(158,154,200)', 'rgb(106,81,163)'],
+      5: ['rgb(242,240,247)', 'rgb(203,201,226)', 'rgb(158,154,200)', 'rgb(117,107,177)', 'rgb(84,39,143)'],
+      6: ['rgb(242,240,247)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(117,107,177)', 'rgb(84,39,143)'],
+      7: ['rgb(242,240,247)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(128,125,186)', 'rgb(106,81,163)', 'rgb(74,20,134)'],
+      8: ['rgb(252,251,253)', 'rgb(239,237,245)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(128,125,186)', 'rgb(106,81,163)', 'rgb(74,20,134)'],
+      9: ['rgb(252,251,253)', 'rgb(239,237,245)', 'rgb(218,218,235)', 'rgb(188,189,220)', 'rgb(158,154,200)', 'rgb(128,125,186)', 'rgb(106,81,163)', 'rgb(84,39,143)', 'rgb(63,0,125)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 0, 0, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 0, 0, 0, 0, 0, 0]
+      }
+    },
+    GnBu: {
+      3: ['rgb(224,243,219)', 'rgb(168,221,181)', 'rgb(67,162,202)'],
+      4: ['rgb(240,249,232)', 'rgb(186,228,188)', 'rgb(123,204,196)', 'rgb(43,140,190)'],
+      5: ['rgb(240,249,232)', 'rgb(186,228,188)', 'rgb(123,204,196)', 'rgb(67,162,202)', 'rgb(8,104,172)'],
+      6: ['rgb(240,249,232)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(67,162,202)', 'rgb(8,104,172)'],
+      7: ['rgb(240,249,232)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,88,158)'],
+      8: ['rgb(247,252,240)', 'rgb(224,243,219)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,88,158)'],
+      9: ['rgb(247,252,240)', 'rgb(224,243,219)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,104,172)', 'rgb(8,64,129)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 1, 2, 2, 2, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 2, 0, 0, 0, 0]
+      }
+    },
+    Greys: {
+      3: ['rgb(240,240,240)', 'rgb(189,189,189)', 'rgb(99,99,99)'],
+      4: ['rgb(247,247,247)', 'rgb(204,204,204)', 'rgb(150,150,150)', 'rgb(82,82,82)'],
+      5: ['rgb(247,247,247)', 'rgb(204,204,204)', 'rgb(150,150,150)', 'rgb(99,99,99)', 'rgb(37,37,37)'],
+      6: ['rgb(247,247,247)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(99,99,99)', 'rgb(37,37,37)'],
+      7: ['rgb(247,247,247)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(115,115,115)', 'rgb(82,82,82)', 'rgb(37,37,37)'],
+      8: ['rgb(255,255,255)', 'rgb(240,240,240)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(115,115,115)', 'rgb(82,82,82)', 'rgb(37,37,37)'],
+      9: ['rgb(255,255,255)', 'rgb(240,240,240)', 'rgb(217,217,217)', 'rgb(189,189,189)', 'rgb(150,150,150)', 'rgb(115,115,115)', 'rgb(82,82,82)', 'rgb(37,37,37)', 'rgb(0,0,0)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 2, 0, 0, 0, 0],
+        'copy': [1, 0, 0, 0, 0, 0, 0],
+        'screen': [1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    YlOrRd: {
+      3: ['rgb(255,237,160)', 'rgb(254,178,76)', 'rgb(240,59,32)'],
+      4: ['rgb(255,255,178)', 'rgb(254,204,92)', 'rgb(253,141,60)', 'rgb(227,26,28)'],
+      5: ['rgb(255,255,178)', 'rgb(254,204,92)', 'rgb(253,141,60)', 'rgb(240,59,32)', 'rgb(189,0,38)'],
+      6: ['rgb(255,255,178)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(240,59,32)', 'rgb(189,0,38)'],
+      7: ['rgb(255,255,178)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(252,78,42)', 'rgb(227,26,28)', 'rgb(177,0,38)'],
+      8: ['rgb(255,255,204)', 'rgb(255,237,160)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(252,78,42)', 'rgb(227,26,28)', 'rgb(177,0,38)'],
+      9: ['rgb(255,255,204)', 'rgb(255,237,160)', 'rgb(254,217,118)', 'rgb(254,178,76)', 'rgb(253,141,60)', 'rgb(252,78,42)', 'rgb(227,26,28)', 'rgb(189,0,38)', 'rgb(128,0,38)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 2, 2, 0, 0, 0],
+        'copy': [1, 2, 2, 0, 0, 0, 0],
+        'screen': [1, 2, 2, 0, 0, 0, 0]
+      }
+    },
+    PuRd: {
+      3: ['rgb(231,225,239)', 'rgb(201,148,199)', 'rgb(221,28,119)'],
+      4: ['rgb(241,238,246)', 'rgb(215,181,216)', 'rgb(223,101,176)', 'rgb(206,18,86)'],
+      5: ['rgb(241,238,246)', 'rgb(215,181,216)', 'rgb(223,101,176)', 'rgb(221,28,119)', 'rgb(152,0,67)'],
+      6: ['rgb(241,238,246)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(221,28,119)', 'rgb(152,0,67)'],
+      7: ['rgb(241,238,246)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(231,41,138)', 'rgb(206,18,86)', 'rgb(145,0,63)'],
+      8: ['rgb(247,244,249)', 'rgb(231,225,239)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(231,41,138)', 'rgb(206,18,86)', 'rgb(145,0,63)'],
+      9: ['rgb(247,244,249)', 'rgb(231,225,239)', 'rgb(212,185,218)', 'rgb(201,148,199)', 'rgb(223,101,176)', 'rgb(231,41,138)', 'rgb(206,18,86)', 'rgb(152,0,67)', 'rgb(103,0,31)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 1, 1, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 1, 0, 0, 0, 0]
+      }
+    },
+    Blues: {
+      3: ['rgb(222,235,247)', 'rgb(158,202,225)', 'rgb(49,130,189)'],
+      4: ['rgb(239,243,255)', 'rgb(189,215,231)', 'rgb(107,174,214)', 'rgb(33,113,181)'],
+      5: ['rgb(239,243,255)', 'rgb(189,215,231)', 'rgb(107,174,214)', 'rgb(49,130,189)', 'rgb(8,81,156)'],
+      6: ['rgb(239,243,255)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(49,130,189)', 'rgb(8,81,156)'],
+      7: ['rgb(239,243,255)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(66,146,198)', 'rgb(33,113,181)', 'rgb(8,69,148)'],
+      8: ['rgb(247,251,255)', 'rgb(222,235,247)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(66,146,198)', 'rgb(33,113,181)', 'rgb(8,69,148)'],
+      9: ['rgb(247,251,255)', 'rgb(222,235,247)', 'rgb(198,219,239)', 'rgb(158,202,225)', 'rgb(107,174,214)', 'rgb(66,146,198)', 'rgb(33,113,181)', 'rgb(8,81,156)', 'rgb(8,48,107)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 2, 0, 0, 0, 0, 0],
+        'copy': [1, 0, 0, 0, 0, 0, 0],
+        'screen': [1, 2, 0, 0, 0, 0, 0]
+      }
+    },
+    PuBuGn: {
+      3: ['rgb(236,226,240)', 'rgb(166,189,219)', 'rgb(28,144,153)'],
+      4: ['rgb(246,239,247)', 'rgb(189,201,225)', 'rgb(103,169,207)', 'rgb(2,129,138)'],
+      5: ['rgb(246,239,247)', 'rgb(189,201,225)', 'rgb(103,169,207)', 'rgb(28,144,153)', 'rgb(1,108,89)'],
+      6: ['rgb(246,239,247)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(28,144,153)', 'rgb(1,108,89)'],
+      7: ['rgb(246,239,247)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(54,144,192)', 'rgb(2,129,138)', 'rgb(1,100,80)'],
+      8: ['rgb(255,247,251)', 'rgb(236,226,240)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(54,144,192)', 'rgb(2,129,138)', 'rgb(1,100,80)'],
+      9: ['rgb(255,247,251)', 'rgb(236,226,240)', 'rgb(208,209,230)', 'rgb(166,189,219)', 'rgb(103,169,207)', 'rgb(54,144,192)', 'rgb(2,129,138)', 'rgb(1,108,89)', 'rgb(1,70,54)'],
+      'properties': {
+        'type': 'seq',
+        'blind': [1],
+        'print': [1, 2, 2, 0, 0, 0, 0],
+        'copy': [1, 2, 0, 0, 0, 0, 0],
+        'screen': [1, 1, 2, 0, 0, 0, 0]
+      }
+    }
+";}
+	}
+}
+

From 81b35afc180082fd70e7e3b02a3d9c85149dc386 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:48:15 -0400
Subject: [PATCH 13/29] Update for new color palette system

---
 SCANsat/SCAN_Data/SCANdata.cs          |  7 +--
 SCANsat/SCAN_Data/SCANterrainConfig.cs | 18 +++---
 SCANsat/SCAN_Map/SCANmapLegend.cs      | 12 ++--
 SCANsat/SCAN_Unity/SCAN_UI_Color.cs    | 84 ++++++++++----------------
 SCANsat/SCANcontroller.cs              | 18 +++---
 SCANsat/SCANutil.cs                    | 78 +++++++++++++++---------
 6 files changed, 106 insertions(+), 111 deletions(-)

diff --git a/SCANsat/SCAN_Data/SCANdata.cs b/SCANsat/SCAN_Data/SCANdata.cs
index 70927e243..6ed7de142 100644
--- a/SCANsat/SCAN_Data/SCANdata.cs
+++ b/SCANsat/SCAN_Data/SCANdata.cs
@@ -23,10 +23,9 @@
 using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;
 using SCANsat.SCAN_Platform;
-using SCANsat.SCAN_Platform.Palettes;
-using SCANsat.SCAN_Platform.Palettes.ColorBrewer;
+using SCANsat.SCAN_Palettes;
 using SCANsat.SCAN_Unity;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat.SCAN_Data
 {
@@ -75,7 +74,7 @@ internal SCANdata(CelestialBody b)
 					newMax = SCANconfigLoader.SCANNode.DefaultMaxHeightRange;
 				}
 
-				terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, body);
+				terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANconfigLoader.SCANPalettes.DefaultPalette, 7, false, false, body);
 				SCANcontroller.addToTerrainConfigData(body.bodyName, terrainConfig);
 			}
 		}
diff --git a/SCANsat/SCAN_Data/SCANterrainConfig.cs b/SCANsat/SCAN_Data/SCANterrainConfig.cs
index 62a7538c4..476361552 100644
--- a/SCANsat/SCAN_Data/SCANterrainConfig.cs
+++ b/SCANsat/SCAN_Data/SCANterrainConfig.cs
@@ -13,7 +13,7 @@
 
 using System.Linq;
 using SCANsat.SCAN_Platform;
-using SCANsat.SCAN_Platform.Palettes;
+using SCANsat.SCAN_Palettes;
 
 namespace SCANsat.SCAN_Data
 {
@@ -44,13 +44,13 @@ public class SCANterrainConfig : SCAN_ConfigNodeStorage
 		[Persistent]
 		private bool paletteDiscrete;
 
-		private Palette colorPal;
+		private SCANPalette colorPal;
 		private CelestialBody body;
 		private float? clampTerrain;
 
 		private float defaultMinHeight, defaultMaxHeight;
 		private float terrainRange;
-		private Palette defaultPalette;
+		private SCANPalette defaultPalette;
 		private int defaultPaletteSize;
 		private bool defaultReverse, defaultDiscrete;
 		private float? defaultClamp;
@@ -58,7 +58,7 @@ public class SCANterrainConfig : SCAN_ConfigNodeStorage
 		private float internalMinHeightMult = 1;
 		private float internalClampHeightMult = 1;
 
-		internal SCANterrainConfig(float min, float max, float? clamp, Palette color, int size, bool reverse, bool discrete, CelestialBody b)
+		internal SCANterrainConfig(float min, float max, float? clamp, SCANPalette color, int size, bool reverse, bool discrete, CelestialBody b)
 		{
 			minHeightRange = min;
 			maxHeightRange = max;
@@ -69,7 +69,7 @@ internal SCANterrainConfig(float min, float max, float? clamp, Palette color, in
 			else
 				clampHeight = clampTerrain.Value.ToString("F0");
 			colorPal = color;
-			paletteName = colorPal.name;
+			paletteName = colorPal.Name;
 			paletteSize = size;
 			paletteReverse = reverse;
 			paletteDiscrete = discrete;
@@ -114,7 +114,7 @@ public override void OnDecodeFromConfigNode()
 			else
 				name = "WrongBody" + index;
 
-			colorPal = SCANUtil.paletteLoader(paletteName, paletteSize);
+			colorPal = SCANUtil.PaletteLoader(paletteName, paletteSize);
 
 			float tempClamp = 0;
 			if (clampHeight == "Null" || clampHeight == "null" || string.IsNullOrEmpty(clampHeight))
@@ -150,7 +150,7 @@ public override void OnEncodeToConfigNode()
 			else
 				clampHeight = clampTerrain.Value.ToString("F0");
 
-			paletteName = colorPal.name;
+			paletteName = colorPal.Name;
 
 			maxHeightMultiplier = 1;
 			minHeightMultiplier = 1;
@@ -229,7 +229,7 @@ internal set
 			}
 		}
 
-		public Palette ColorPal
+		public SCANPalette ColorPal
 		{
 			get { return colorPal; }
 			internal set { colorPal = value; }
@@ -278,7 +278,7 @@ public float? DefaultClampHeight
 			get { return defaultClamp; }
 		}
 
-		public Palette DefaultPalette
+		public SCANPalette DefaultPalette
 		{
 			get { return defaultPalette; }
 		}
diff --git a/SCANsat/SCAN_Map/SCANmapLegend.cs b/SCANsat/SCAN_Map/SCANmapLegend.cs
index 77de1de4d..3c9721787 100644
--- a/SCANsat/SCAN_Map/SCANmapLegend.cs
+++ b/SCANsat/SCAN_Map/SCANmapLegend.cs
@@ -12,9 +12,9 @@
 #endregion
 
 using System;
-using SCANsat.SCAN_Platform.Palettes;
+using SCANsat.SCAN_Palettes;
 using SCANsat.SCAN_Data;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 using UnityEngine;
 
@@ -24,7 +24,7 @@ public class SCANmapLegend
 	{
 		private Texture2D legend;
 		private float legendMin, legendMax;
-		private Palette dataPalette;
+		private SCANPalette dataPalette;
 		private bool legendScheme;
 		private bool stockScheme;
 		private CelestialBody body;
@@ -37,7 +37,7 @@ public Texture2D Legend
 
 		public Texture2D getLegend(bool color, SCANterrainConfig terrain)
 		{
-			if (legend != null && legendMin == terrain.MinTerrain && legendMax == terrain.MaxTerrain && legendScheme == color && terrain.ColorPal.hash == dataPalette.hash)
+			if (legend != null && legendMin == terrain.MinTerrain && legendMax == terrain.MaxTerrain && legendScheme == color && terrain.ColorPal.Hash == dataPalette.Hash)
 				return legend;
 
 			body = null;
@@ -60,7 +60,7 @@ public Texture2D getLegend(bool color, SCANterrainConfig terrain)
 
 		public Texture2D getLegend(float min, float max, bool color, SCANterrainConfig terrain)
 		{
-			if (legend != null && legendMin == min && legendMax == max && legendScheme == color && terrain.ColorPal.hash == dataPalette.hash)
+			if (legend != null && legendMin == min && legendMax == max && legendScheme == color && terrain.ColorPal.Hash == dataPalette.Hash)
 				return legend;
 
 			legend = new Texture2D(256, 1, TextureFormat.RGB24, false);
@@ -84,7 +84,7 @@ public Texture2D getLegend(SCANdata data, bool color, bool stock, CBAttributeMap
 			if (legend != null && legendScheme == color && stockScheme == stock && body == data.Body && !reset)
 				return legend;
 
-			dataPalette = new Palette();
+			dataPalette = new SCANPalette();
 
 			legend = new Texture2D(256, 1, TextureFormat.RGB24, false);
 			body = data.Body;
diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Color.cs b/SCANsat/SCAN_Unity/SCAN_UI_Color.cs
index e10485541..dfa83b682 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_Color.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_Color.cs
@@ -20,8 +20,8 @@
 using SCANsat.Unity.Unity;
 using SCANsat.SCAN_Data;
 using SCANsat.SCAN_Map;
-using SCANsat.SCAN_Platform.Palettes;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using SCANsat.SCAN_Palettes;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat.SCAN_Unity
 {
@@ -54,7 +54,7 @@ public class SCAN_UI_Color : ISCAN_Color
 		private int _terrainSize;
 
 		private SCANterrainConfig currentTerrain;
-		private Palette currentPalette;
+		private SCANPaletteGroup currentPalette;
 
 		private SCANresourceGlobal currentResource;
 		private List loadedResources;
@@ -96,12 +96,12 @@ public void Refresh()
 
 			if (currentTerrain != null)
 			{
-				currentPalette = currentTerrain.ColorPal;
+				palette.CurrentPalettes = palette.SetCurrentPalettesType(currentPalette.Kind);
 
-				palette.CurrentPalettes = palette.setCurrentPalettesType(currentPalette.kind, currentPalette.size);
+				currentPalette = palette.CurrentPalettes.GetPaletteGroup(currentTerrain.ColorPal.Name); 
 
-				_terrainPalette = currentTerrain.ColorPal.name;
-				_terrainPaletteStyle = currentTerrain.ColorPal.kind.ToString();
+				_terrainPalette = currentTerrain.ColorPal.Name;
+				_terrainPaletteStyle = currentTerrain.ColorPal.Kind.ToString();
 
 				_terrainCurrentMin = currentTerrain.MinTerrain;
 				_terrainCurrentMax = currentTerrain.MaxTerrain;
@@ -181,12 +181,12 @@ public string TerrainPlanet
 
 				if (currentTerrain != null)
 				{
-					currentPalette = currentTerrain.ColorPal;
+					palette.CurrentPalettes = palette.SetCurrentPalettesType(currentPalette.Kind);
 
-					palette.CurrentPalettes = palette.setCurrentPalettesType(currentPalette.kind, currentPalette.size);
+					currentPalette = palette.CurrentPalettes.GetPaletteGroup(currentTerrain.ColorPal.Name); 
 
-					_terrainPalette = currentTerrain.ColorPal.name;
-					_terrainPaletteStyle = currentTerrain.ColorPal.kind.ToString();
+					_terrainPalette = currentTerrain.ColorPal.Name;
+					_terrainPaletteStyle = currentTerrain.ColorPal.Kind.ToString();
 
 					_terrainCurrentMin = currentTerrain.MinTerrain;
 					_terrainCurrentMax = currentTerrain.MaxTerrain;
@@ -206,16 +206,7 @@ public string TerrainPalette
 			{
 				_terrainPalette = value;
 
-				for (int i = palette.CurrentPalettes.Length - 1; i >= 0; i--)
-				{
-					Palette p = palette.CurrentPalettes.availablePalettes[i];
-
-					if (p.name != value)
-						continue;
-
-					currentPalette = p;
-					break;
-				}
+				currentPalette = palette.CurrentPalettes.GetPaletteGroup(value);
 			}
 		}
 
@@ -226,22 +217,22 @@ public string TerrainPaletteStyle
 			{
 				_terrainPaletteStyle = value;
 
-				Palette.Kind kind = Palette.Kind.Diverging;
+				SCANPaletteKind kind = SCANPaletteKind.Diverging;
 				
 				try
 				{
-					kind = (Palette.Kind)Enum.Parse(typeof(Palette.Kind), value);
+					kind = (SCANPaletteKind)Enum.Parse(typeof(SCANPaletteKind), value);
 				}
 				catch (Exception e)
 				{
 					SCANUtil.SCANlog("Error in palette style type\n{0}", e);
 				}
 
-				palette.CurrentPalettes = palette.setCurrentPalettesType(kind, _terrainSize);
+				palette.CurrentPalettes = palette.SetCurrentPalettesType(kind);
 
-				currentPalette = palette.CurrentPalettes.availablePalettes[0];
+				currentPalette = palette.CurrentPalettes.GetFirstGroup();
 
-				_terrainPalette = currentPalette.name;
+				_terrainPalette = currentPalette._PaletteName;
 			}
 		}
 
@@ -295,7 +286,7 @@ public bool TerrainDiscrete
 
 		public bool TerrainHasSize
 		{
-			get { return currentPalette.kind != Palette.Kind.Fixed; }
+			get { return currentPalette.Kind != SCANPaletteKind.Fixed; }
 		}
 
 		public float BiomeTransparency
@@ -362,19 +353,6 @@ public int TerrainSize
 			set
 			{
 				_terrainSize = value;
-
-				palette.CurrentPalettes = palette.setCurrentPalettesType(currentPalette.kind, _terrainSize);
-
-				for (int i = palette.CurrentPalettes.Length - 1; i >= 0; i--)
-				{
-					Palette p = palette.CurrentPalettes.availablePalettes[i];
-
-					if (p.name != currentPalette.name)
-						continue;
-
-					currentPalette = p;
-					break;
-				}
 			}
 		}
 
@@ -387,13 +365,13 @@ public int TerrainSizeMax
 		{
 			get
 			{
-				switch(currentTerrain.ColorPal.kind)
+				switch(currentTerrain.ColorPal.Kind)
 				{
-					case Palette.Kind.Diverging:
+					case SCANPaletteKind.Diverging:
 						return 11;
-					case Palette.Kind.Qualitative:
+					case SCANPaletteKind.Qualitative:
 						return 12;
-					case Palette.Kind.Sequential:
+					case SCANPaletteKind.Sequential:
 						return 9;
 				}
 
@@ -450,10 +428,10 @@ public Texture2D TerrainPaletteNew
 		{
 			get
 			{
-				Color32[] c = currentPalette.colors;
+				Color32[] c = currentPalette.GetPalette(_terrainSize).ColorsArray;
 
 				if (_terrainReverse)
-					c = currentPalette.colorsReverse;
+					c = currentPalette.GetPalette(_terrainSize).ColorsReverse;
 
 				return SCANmapLegend.getStaticLegend(_terrainCurrentMax, _terrainCurrentMin, _terrainCurrentMax - _terrainCurrentMin, _terrainClampOn ? (float?)_terrainClamp : null, _terrainDiscrete, c);
 			}
@@ -465,11 +443,13 @@ public IList> TerrainPalettes
 			{
 				List> values = new List>();
 
-				for (int i = 0; i < palette.CurrentPalettes.Length; i++)
-				{
-					Palette p = palette.CurrentPalettes.availablePalettes[i];
+				palette.CurrentPalettes.GenerateSwatches(_terrainSize);
+
+				string[] names = palette.CurrentPalettes.GetGroupNames();
 
-					values.Add(new KeyValuePair(p.name, palette.CurrentPalettes.paletteSwatch[i]));
+				for (int i = 0; i < palette.CurrentPalettes.Count; i++)
+				{
+					values.Add(new KeyValuePair(names[i], palette.CurrentPalettes.PaletteSwatch[i]));
 				}
 
 				return values;
@@ -542,7 +522,7 @@ public IList CelestialBodies
 
 		public IList PaletteStyleNames
 		{
-			get { return new List(Palette.kindNames); }
+			get { return new List(palette.GetPaletteKindNames()); }
 		}
 
 		public void BiomeApply(Color one, Color two)
@@ -733,7 +713,7 @@ public void TerrainApply()
 			currentTerrain.PalRev = _terrainReverse;
 			currentTerrain.PalSize = _terrainSize;
 
-			currentTerrain.ColorPal = currentPalette;
+			currentTerrain.ColorPal = currentPalette.GetPalette(_terrainSize);
 
 			SCANcontroller.updateTerrainConfig(currentTerrain);
 
diff --git a/SCANsat/SCANcontroller.cs b/SCANsat/SCANcontroller.cs
index c9e502ebe..76cad857f 100644
--- a/SCANsat/SCANcontroller.cs
+++ b/SCANsat/SCANcontroller.cs
@@ -30,11 +30,9 @@
 using SCANsat.SCAN_PartModules;
 using SCANsat.SCAN_Platform;
 using SCANsat.SCAN_Platform.Extensions.ConfigNodes;
-using SCANsat.SCAN_Platform.Palettes;
-using SCANsat.SCAN_Platform.Palettes.ColorBrewer;
-using SCANsat.SCAN_Platform.Palettes.FixedColors;
+using SCANsat.SCAN_Palettes;
 using SCANsat.SCAN_Toolbar;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat
 {
@@ -269,7 +267,7 @@ public static void checkLoadedTerrainNodes()
 
 					SCANUtil.SCANlog("Generating new SCANsat Terrain Config for [{0}] - Max Height: [{1:F0}m]", b.bodyName, newMax);
 
-					addToTerrainConfigData(b.bodyName, new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, b));
+					addToTerrainConfigData(b.bodyName, new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.PaletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, b));
 				}
 			}
 		}
@@ -639,11 +637,11 @@ public override void OnLoad(ConfigNode node)
 							string paletteName = node_body.parse("PaletteName", "");
 
 							if (string.IsNullOrEmpty(paletteName))
-								paletteName = data.TerrainConfig.DefaultPalette.name;
+								paletteName = data.TerrainConfig.DefaultPalette.Name;
 
-							Palette dataPalette = SCANUtil.paletteLoader(paletteName, pSize);
+							SCANPalette dataPalette = SCANUtil.PaletteLoader(paletteName, pSize);
 
-							if (dataPalette.hash == PaletteLoader.defaultPalette.hash)
+							if (dataPalette.Hash == SCANconfigLoader.SCANPalettes.DefaultPalette.Hash)
 							{
 								paletteName = "Default";
 								pSize = 7;
@@ -724,7 +722,7 @@ public override void OnSave(ConfigNode node)
 					node_body.AddValue("MaxHeightRange", body_scan.TerrainConfig.MaxTerrain / body_scan.TerrainConfig.MaxHeightMultiplier);
 					if (body_scan.TerrainConfig.ClampTerrain != null)
 						node_body.AddValue("ClampHeight", body_scan.TerrainConfig.ClampTerrain / body_scan.TerrainConfig.ClampHeightMultiplier);
-					node_body.AddValue("PaletteName", body_scan.TerrainConfig.ColorPal.name);
+					node_body.AddValue("PaletteName", body_scan.TerrainConfig.ColorPal.Name);
 					node_body.AddValue("PaletteSize", body_scan.TerrainConfig.PalSize);
 					node_body.AddValue("PaletteReverse", body_scan.TerrainConfig.PalRev);
 					node_body.AddValue("PaletteDiscrete", body_scan.TerrainConfig.PalDis);
@@ -1452,7 +1450,7 @@ private void SOIChange(GameEvents.HostedFromToAction VC)
 				body_data.Add(VC.to.bodyName, new SCANdata(VC.to));
 		}
 
-		private void setNewTerrainConfigValues(SCANterrainConfig terrain, float min, float max, float? clamp, Palette c, int size, bool reverse, bool discrete)
+		private void setNewTerrainConfigValues(SCANterrainConfig terrain, float min, float max, float? clamp, SCANPalette c, int size, bool reverse, bool discrete)
 		{
 			terrain.MinTerrain = min * terrain.MinHeightMultiplier;
 			terrain.MaxTerrain = max * terrain.MaxHeightMultiplier;
diff --git a/SCANsat/SCANutil.cs b/SCANsat/SCANutil.cs
index 3c61ad3cd..2f0f374bb 100644
--- a/SCANsat/SCANutil.cs
+++ b/SCANsat/SCANutil.cs
@@ -21,12 +21,10 @@
 using KSP.Localization;
 using SCANsat.SCAN_PartModules;
 using SCANsat.SCAN_Platform;
-using SCANsat.SCAN_Platform.Palettes;
-using SCANsat.SCAN_Platform.Palettes.ColorBrewer;
-using SCANsat.SCAN_Platform.Palettes.FixedColors;
+using SCANsat.SCAN_Palettes;
 using SCANsat.SCAN_Data;
 using SCANsat.SCAN_UI.UI_Framework;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat
 {
@@ -568,39 +566,59 @@ internal static string displayNameFromResource(string resource)
 			return resource;
 		}
 
-		internal static Palette paletteLoader(string name, int size)
+		internal static SCANPalette PaletteLoader(string name, int size)
 		{
 			if (name == "Default" || string.IsNullOrEmpty(name))
-				return PaletteLoader.defaultPalette;
+				return SCANconfigLoader.SCANPalettes.DefaultPalette;
 			else
 			{
-				try
-				{
-					if (name == "blackForest" || name == "departure" || name == "northRhine" || name == "mars" || name == "wiki2" || name == "plumbago" || name == "cw1_013" || name == "arctic" || name == "mercury" || name == "venus")
-					{
-						//Load the fixed size color palette by name through reflection
-						var fixedPallete = typeof(FixedColorPalettes);
-						var fPaletteMethod = fixedPallete.GetMethod(name);
-						var fColorP = fPaletteMethod.Invoke(null, null);
-						return (Palette)fColorP;
-					}
-					else
-					{
-						//Load the ColorBrewer method by name through reflection
-						var brewer = typeof(BrewerPalettes);
-						var bPaletteMethod = brewer.GetMethod(name);
-						var bColorP = bPaletteMethod.Invoke(null, new object[] { size });
-						return (Palette)bColorP;
-					}
-				}
-				catch (Exception e)
-				{
-					SCANUtil.SCANlog("Error Loading Color Palette; Revert To Default: {0}", e);
-					return PaletteLoader.defaultPalette;
-				}
+				SCANPaletteGroup group = SCANconfigLoader.SCANPalettes.GetPaletteGroup(name);
+
+				if (group == null)
+					return SCANconfigLoader.SCANPalettes.DefaultPalette;
+
+				SCANPalette pal = group.GetPalette(size);
+
+				if (pal == null)
+					return SCANconfigLoader.SCANPalettes.DefaultPalette;
+
+				return pal;
 			}
 		}
 
+		//internal static Palette paletteLoader(string name, int size)
+		//{
+		//	if (name == "Default" || string.IsNullOrEmpty(name))
+		//		return PaletteLoader.defaultPalette;
+		//	else
+		//	{
+		//		try
+		//		{
+		//			if (name == "blackForest" || name == "departure" || name == "northRhine" || name == "mars" || name == "wiki2" || name == "plumbago" || name == "cw1_013" || name == "arctic" || name == "mercury" || name == "venus")
+		//			{
+		//				//Load the fixed size color palette by name through reflection
+		//				var fixedPallete = typeof(FixedColorPalettes);
+		//				var fPaletteMethod = fixedPallete.GetMethod(name);
+		//				var fColorP = fPaletteMethod.Invoke(null, null);
+		//				return (Palette)fColorP;
+		//			}
+		//			else
+		//			{
+		//				//Load the ColorBrewer method by name through reflection
+		//				var brewer = typeof(BrewerPalettes);
+		//				var bPaletteMethod = brewer.GetMethod(name);
+		//				var bColorP = bPaletteMethod.Invoke(null, new object[] { size });
+		//				return (Palette)bColorP;
+		//			}
+		//		}
+		//		catch (Exception e)
+		//		{
+		//			SCANUtil.SCANlog("Error Loading Color Palette; Revert To Default: {0}", e);
+		//			return PaletteLoader.defaultPalette;
+		//		}
+		//	}
+		//}
+
 		internal static CelestialBody getTargetBody(MapObject target)
 		{
 			switch (target.type)

From 981ed481f344caf69b8fe8a1d10c655da5380a0d Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Tue, 22 Aug 2017 13:48:30 -0400
Subject: [PATCH 14/29] Load new color palette config file

---
 SCANsat/SCANconfigLoader.cs | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/SCANsat/SCANconfigLoader.cs b/SCANsat/SCANconfigLoader.cs
index d8595816b..3b2d945d4 100644
--- a/SCANsat/SCANconfigLoader.cs
+++ b/SCANsat/SCANconfigLoader.cs
@@ -14,12 +14,10 @@
 using System.Linq;
 using SCANsat.SCAN_Data;
 using SCANsat.SCAN_Platform;
-using SCANsat.SCAN_Platform.Palettes;
-using SCANsat.SCAN_Platform.Palettes.ColorBrewer;
-using SCANsat.SCAN_Platform.Palettes.FixedColors;
+using SCANsat.SCAN_Palettes;
 using SCANsat.SCAN_UI.UI_Framework;
 using UnityEngine;
-using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette;
+using palette = SCANsat.SCAN_UI.UI_Framework.SCANcolorUtil;
 
 namespace SCANsat
 {
@@ -31,13 +29,22 @@ public static class SCANconfigLoader
 		private const string configFile = "SCANsat/Resources/SCANcolors";
 		private const string configNodeName = "SCAN_Color_Config";
 
+		private const string paletteFile = "SCANsat/Resources/SCANpalettes";
+		private const string paletteNodeName = "SCAN_Palette_Config";
+
 		private static SCAN_Color_Config SCANnode;
+		private static SCAN_Palette_Config SCANpalettes;
 
 		public static SCAN_Color_Config SCANNode
 		{
 			get { return SCANnode; }
 		}
 
+		public static SCAN_Palette_Config SCANPalettes
+		{
+			get { return SCANpalettes; }
+		}
+
 		public static bool GlobalResource
 		{
 			get { return globalResource; }
@@ -52,6 +59,7 @@ internal static void configLoader()
 		{
 			loadSCANtypes();
 
+			SCANpalettes = new SCAN_Palette_Config(paletteFile, paletteNodeName);
 			SCANnode = new SCAN_Color_Config(configFile, configNodeName);
 
 			SCANcontroller.checkLoadedTerrainNodes();

From f1404b1f504333426ea81f0234e92ed56c922ae3 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:06:54 -0400
Subject: [PATCH 15/29] Fix agency title; fix #300

---
 SCANassets/Flags/Agents.cfg | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/SCANassets/Flags/Agents.cfg b/SCANassets/Flags/Agents.cfg
index 577afbbb8..c760ebb08 100644
--- a/SCANassets/Flags/Agents.cfg
+++ b/SCANassets/Flags/Agents.cfg
@@ -3,6 +3,8 @@
 AGENT
 {
 	name = SCAN: Scientific Committee on Advanced Navigation
+
+	title = SCAN
 	
 	description = The SCAN agency is dedicated to mapping and surveying every planet in the solar system.
 	

From 37c17dab3eccd929a9a2b7b42f8588a89565a4c5 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:07:08 -0400
Subject: [PATCH 16/29] Remove unneeded ASET MM patches

---
 SCANassets/MM_Parts/MFDPatches.cfg | 72 ------------------------------
 1 file changed, 72 deletions(-)

diff --git a/SCANassets/MM_Parts/MFDPatches.cfg b/SCANassets/MM_Parts/MFDPatches.cfg
index c60a58d56..9064de5ca 100644
--- a/SCANassets/MM_Parts/MFDPatches.cfg
+++ b/SCANassets/MM_Parts/MFDPatches.cfg
@@ -1,42 +1,5 @@
 //These patches add additional functionality to the SCANsat pages in stock and ALCOR MFDs
 
-
-@PROP[ALCORMFD60x30]:FOR[SCANsat]:NEEDS[RasterPropMonitor,ASET]
-{
-	@MODULE[RasterPropMonitor]
-	{
-		@PAGE[pALCOROrbitMap60x30]
-		{
-			@BACKGROUNDHANDLER[JSISCANsatRPM]
-			{
-				@buttonHome = 6
-				buttonRight = 5
-				buttonLeft = 1
-				buttonR9 = 8
-				buttonR10 = 7
-				startLine = 120
-				stopLine = 390
-				mapDivider = 2
-				resourceInterpolation = 4
-			}
-		}
-		
-		@PAGE[pALCORClearMap60x30]
-		{
-			@BACKGROUNDHANDLER[JSISCANsatRPM]
-			{
-				@buttonHome = 6
-				buttonRight = 5
-				buttonLeft = 1
-				buttonR9 = 8
-				buttonR10 = 7
-				mapDivider = 2
-				resourceInterpolation = 4
-			}
-		}
-	}
-}
-	
 @PROP[kOSTerminal]:FOR[SCANsat]:NEEDS[RasterPropMonitor,ASET]
 {
 	@MODULE[RasterPropMonitor]
@@ -66,38 +29,3 @@
 		}
 	}
 }
-
-
-@PROP[ALCORMFD40x20]:FOR[SCANsat]:NEEDS[RasterPropMonitor,ASET]
-{
-	@MODULE[RasterPropMonitor]
-	{
-		@PAGE[pALCORMapOrbit40x20]
-		{
-			@BACKGROUNDHANDLER[JSISCANsatRPM]
-			{
-				buttonHome = 4
-				buttonRight = 5
-				buttonLeft = 6
-				buttonR9 = 7
-				buttonR10 = 8
-				mapDivider = 2
-				resourceInterpolation = 4
-			}
-		}
-		
-		@PAGE[pALCORMapLanding40x20]
-		{
-			@BACKGROUNDHANDLER[JSISCANsatRPM]
-			{
-				buttonHome = 4
-				buttonRight = 5
-				buttonLeft = 6
-				buttonR9 = 7
-				buttonR10 = 8
-				mapDivider = 2
-				resourceInterpolation = 4
-			}
-		}
-	}
-}

From c30cfc3ba3b66f2a6d93a65f419e3796c74b92b5 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:07:20 -0400
Subject: [PATCH 17/29] Default color palette file

---
 SCANassets/Resources/SCANpalettes.cfg | 1250 +++++++++++++++++++++++++
 1 file changed, 1250 insertions(+)
 create mode 100644 SCANassets/Resources/SCANpalettes.cfg

diff --git a/SCANassets/Resources/SCANpalettes.cfg b/SCANassets/Resources/SCANpalettes.cfg
new file mode 100644
index 000000000..59f6400a6
--- /dev/null
+++ b/SCANassets/Resources/SCANpalettes.cfg
@@ -0,0 +1,1250 @@
+SCAN_Palette_Config
+{
+	PaletteTypes
+	{
+		Item
+		{
+			name = Fixed
+			PaletteGroups
+			{
+				Item
+				{
+					name = blackForest
+					Palettes
+					{
+						Item
+						{
+							Colors = 176,243,190,255|224,251,178,255|184,222,118,255|39,165,42,255|52,136,60,255|156,164,41,255|248,176,4,255|192,74,2,255|135,8,0,255|116,24,5,255|108,42,10,255|125,74,43,255|156,129,112,255|181,181,181,255|218,216,218,255
+						}
+					}
+				}
+				Item
+				{
+					name = mars
+					Palettes
+					{
+						Item
+						{
+							Colors = 120,65,20,255|141,84,43,255|164,114,66,255|188,144,89,255|211,174,112,255|235,205,136,255|219,185,120,255|204,165,105,255|189,145,90,255|174,125,75,255|159,110,70,255|160,120,80,255|174,134,100,255|189,163,140,255|204,191,180,255|220,212,205,255|240,232,225,255|255,255,255,255
+						}
+					}
+				}
+				Item
+				{
+					name = departure
+					Palettes
+					{
+						Item
+						{
+							Colors = 68,34,0,255|102,51,0,255|160,108,60,255|218,166,120,255|238,212,188,255|255,255,255,255|200,255,200,255|100,255,100,255|0,255,0,255|0,192,0,255|0,128,0,255
+						}
+					}
+				}
+				Item
+				{
+					name = northRhine
+					Palettes
+					{
+						Item
+						{
+							Colors = 5,6,3,255|55,55,36,255|24,62,41,255|52,105,69,255|62,138,89,255|108,163,99,255|165,186,111,255|231,213,122,255|199,167,92,255|176,120,58,255
+						}
+					}
+				}
+				Item
+				{
+					name = wiki2
+					Palettes
+					{
+						Item
+						{
+							Colors = 113,171,216,255|216,242,254,255|148,191,139,255|239,235,192,255|170,135,83,255|245,244,242,255
+						}
+					}
+				}
+				Item
+				{
+					name = plumbago
+					Palettes
+					{
+						Item
+						{
+							Colors = 151,0,176,255|23,0,151,255|203,254,254,255|0,168,0,255|254,254,126,255|87,36,36,255|203,101,203,255|228,190,228,255
+						}
+					}
+				}
+				Item
+				{
+					name = cw1_013
+					Palettes
+					{
+						Item
+						{
+							Colors = 97,65,78,255|226,87,68,255|252,255,67,255|86,118,157,255|167,214,255,255
+						}
+					}
+				}
+				Item
+				{
+					name = arctic
+					Palettes
+					{
+						Item
+						{
+							Colors = 44,53,99,255|197,197,206,255|150,210,131,255|174,223,135,255|195,230,138,255|218,237,142,255|226,233,137,255|232,217,119,255|238,200,102,255|231,183,89,255|196,167,89,255|174,158,89,255
+						}
+					}
+				}
+				Item
+				{
+					name = mercury
+					Palettes
+					{
+						Item
+						{
+							Colors = 22,22,22,255|195,130,185,255|170,120,156,255|160,120,200,255|141,96,179,255|62,30,121,255|20,0,193,255|30,50,194,255|58,102,219,255|78,135,215,255|113,196,255,255|95,210,220,255|125,213,226,255|105,188,206,255|140,185,205,255|170,181,201,255|195,203,192,255|180,205,157,255|105,195,101,255|114,171,79,255|128,156,106,255|104,106,74,255|79,46,36,255|110,71,60,255|140,94,55,255|175,137,65,255|202,166,59,255|226,211,62,255|215,136,35,255|191,75,42,255|206,20,20,255|236,75,79,255|236,178,157,255|255,255,255,255
+						}
+					}
+				}
+				Item
+				{
+					name = venus
+					Palettes
+					{
+						Item
+						{
+							Colors = 93,61,126,255|52,52,152,255|81,164,168,255|54,156,51,255|197,199,94,255|153,95,66,255|166,69,69,255|183,88,154,255
+						}
+					}
+				}
+				Item
+				{
+					name = Default
+					Palettes
+					{
+						Item
+						{
+							Colors = 52,5,62,255|4,133,209,255|75,93,22,255|255,255,20,255|229,0,0,255|194,0,119,255|255,255,255,255
+						}
+					}
+				}
+			}
+		}
+		Item
+		{
+			name = Sequential
+			PaletteGroups
+			{
+				Item
+				{
+					name = OrRd
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,247,236,255|254,232,200,255|253,212,158,255|253,187,132,255|252,141,89,255|239,101,72,255|215,48,31,255|179,0,0,255|127,0,0,255
+						}
+						Item
+						{
+							Colors = 255,247,236,255|254,232,200,255|253,212,158,255|253,187,132,255|252,141,89,255|239,101,72,255|215,48,31,255|153,0,0,255
+						}
+						Item
+						{
+							Colors = 254,240,217,255|253,212,158,255|253,187,132,255|252,141,89,255|239,101,72,255|215,48,31,255|153,0,0,255
+						}
+						Item
+						{
+							Colors = 254,240,217,255|253,212,158,255|253,187,132,255|252,141,89,255|227,74,51,255|179,0,0,255
+						}
+						Item
+						{
+							Colors = 254,240,217,255|253,204,138,255|252,141,89,255|227,74,51,255|179,0,0,255
+						}
+						Item
+						{
+							Colors = 254,240,217,255|253,204,138,255|252,141,89,255|215,48,31,255
+						}
+						Item
+						{
+							Colors = 254,232,200,255|253,187,132,255|227,74,51,255
+						}
+					}
+				}
+				Item
+				{
+					name = BuPu
+					Palettes
+					{
+						Item
+						{
+							Colors = 247,252,253,255|224,236,244,255|191,211,230,255|158,188,218,255|140,150,198,255|140,107,177,255|136,65,157,255|129,15,124,255|77,0,75,255
+						}
+						Item
+						{
+							Colors = 247,252,253,255|224,236,244,255|191,211,230,255|158,188,218,255|140,150,198,255|140,107,177,255|136,65,157,255|110,1,107,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|191,211,230,255|158,188,218,255|140,150,198,255|140,107,177,255|136,65,157,255|110,1,107,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|191,211,230,255|158,188,218,255|140,150,198,255|136,86,167,255|129,15,124,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|179,205,227,255|140,150,198,255|136,86,167,255|129,15,124,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|179,205,227,255|140,150,198,255|136,65,157,255
+						}
+						Item
+						{
+							Colors = 224,236,244,255|158,188,218,255|136,86,167,255
+						}
+					}
+				}
+				Item
+				{
+					name = BuGn
+					Palettes
+					{
+						Item
+						{
+							Colors = 247,252,253,255|229,245,249,255|204,236,230,255|153,216,201,255|102,194,164,255|65,174,118,255|35,139,69,255|0,109,44,255|0,68,27,255
+						}
+						Item
+						{
+							Colors = 247,252,253,255|229,245,249,255|204,236,230,255|153,216,201,255|102,194,164,255|65,174,118,255|35,139,69,255|0,88,36,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|204,236,230,255|153,216,201,255|102,194,164,255|65,174,118,255|35,139,69,255|0,88,36,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|204,236,230,255|153,216,201,255|102,194,164,255|44,162,95,255|0,109,44,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|178,226,226,255|102,194,164,255|44,162,95,255|0,109,44,255
+						}
+						Item
+						{
+							Colors = 237,248,251,255|178,226,226,255|102,194,164,255|35,139,69,255
+						}
+						Item
+						{
+							Colors = 229,245,249,255|153,216,201,255|44,162,95,255
+						}
+					}
+				}
+				Item
+				{
+					name = YlOrBr
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,255,229,255|255,247,188,255|254,227,145,255|254,196,79,255|254,153,41,255|236,112,20,255|204,76,2,255|153,52,4,255|102,37,6,255
+						}
+						Item
+						{
+							Colors = 255,255,229,255|255,247,188,255|254,227,145,255|254,196,79,255|254,153,41,255|236,112,20,255|204,76,2,255|140,45,4,255
+						}
+						Item
+						{
+							Colors = 255,255,212,255|254,227,145,255|254,196,79,255|254,153,41,255|236,112,20,255|204,76,2,255|140,45,4,255
+						}
+						Item
+						{
+							Colors = 255,255,212,255|254,227,145,255|254,196,79,255|254,153,41,255|217,95,14,255|153,52,4,255
+						}
+						Item
+						{
+							Colors = 255,255,212,255|254,217,142,255|254,153,41,255|217,95,14,255|153,52,4,255
+						}
+						Item
+						{
+							Colors = 255,255,212,255|254,217,142,255|254,153,41,255|204,76,2,255
+						}
+						Item
+						{
+							Colors = 255,247,188,255|254,196,79,255|217,95,14,255
+						}
+					}
+				}
+				Item
+				{
+					name = YlGn
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,255,229,255|247,252,185,255|217,240,163,255|173,221,142,255|120,198,121,255|65,171,93,255|35,132,67,255|0,104,55,255|0,69,41,255
+						}
+						Item
+						{
+							Colors = 255,255,229,255|247,252,185,255|217,240,163,255|173,221,142,255|120,198,121,255|65,171,93,255|35,132,67,255|0,90,50,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|217,240,163,255|173,221,142,255|120,198,121,255|65,171,93,255|35,132,67,255|0,90,50,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|217,240,163,255|173,221,142,255|120,198,121,255|49,163,84,255|0,104,55,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|194,230,153,255|120,198,121,255|49,163,84,255|0,104,55,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|194,230,153,255|120,198,121,255|35,132,67,255
+						}
+						Item
+						{
+							Colors = 247,252,185,255|173,221,142,255|49,163,84,255
+						}
+					}
+				}
+				Item
+				{
+					name = Reds
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,245,240,255|254,224,210,255|252,187,161,255|252,146,114,255|251,106,74,255|239,59,44,255|203,24,29,255|165,15,21,255|103,0,13,255
+						}
+						Item
+						{
+							Colors = 255,245,240,255|254,224,210,255|252,187,161,255|252,146,114,255|251,106,74,255|239,59,44,255|203,24,29,255|153,0,13,255
+						}
+						Item
+						{
+							Colors = 254,229,217,255|252,187,161,255|252,146,114,255|251,106,74,255|239,59,44,255|203,24,29,255|153,0,13,255
+						}
+						Item
+						{
+							Colors = 254,229,217,255|252,187,161,255|252,146,114,255|251,106,74,255|222,45,38,255|165,15,21,255
+						}
+						Item
+						{
+							Colors = 254,229,217,255|252,174,145,255|251,106,74,255|222,45,38,255|165,15,21,255
+						}
+						Item
+						{
+							Colors = 254,229,217,255|252,174,145,255|251,106,74,255|203,24,29,255
+						}
+						Item
+						{
+							Colors = 254,224,210,255|252,146,114,255|222,45,38,255
+						}
+					}
+				}
+				Item
+				{
+					name = RdPu
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,247,243,255|253,224,221,255|252,197,192,255|250,159,181,255|247,104,161,255|221,52,151,255|174,1,126,255|122,1,119,255|73,0,106,255
+						}
+						Item
+						{
+							Colors = 255,247,243,255|253,224,221,255|252,197,192,255|250,159,181,255|247,104,161,255|221,52,151,255|174,1,126,255|122,1,119,255
+						}
+						Item
+						{
+							Colors = 254,235,226,255|252,197,192,255|250,159,181,255|247,104,161,255|221,52,151,255|174,1,126,255|122,1,119,255
+						}
+						Item
+						{
+							Colors = 254,235,226,255|252,197,192,255|250,159,181,255|247,104,161,255|197,27,138,255|122,1,119,255
+						}
+						Item
+						{
+							Colors = 254,235,226,255|251,180,185,255|247,104,161,255|197,27,138,255|122,1,119,255
+						}
+						Item
+						{
+							Colors = 254,235,226,255|251,180,185,255|247,104,161,255|174,1,126,255
+						}
+						Item
+						{
+							Colors = 253,224,221,255|250,159,181,255|197,27,138,255
+						}
+					}
+				}
+				Item
+				{
+					name = YlGnBu
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,255,217,255|237,248,177,255|199,233,180,255|127,205,187,255|65,182,196,255|29,145,192,255|34,94,168,255|37,52,148,255|8,29,88,255
+						}
+						Item
+						{
+							Colors = 255,255,217,255|237,248,177,255|199,233,180,255|127,205,187,255|65,182,196,255|29,145,192,255|34,94,168,255|12,44,132,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|199,233,180,255|127,205,187,255|65,182,196,255|29,145,192,255|34,94,168,255|12,44,132,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|199,233,180,255|127,205,187,255|65,182,196,255|44,127,184,255|37,52,148,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|161,218,180,255|65,182,196,255|44,127,184,255|37,52,148,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|161,218,180,255|65,182,196,255|34,94,168,255
+						}
+						Item
+						{
+							Colors = 237,248,177,255|127,205,187,255|44,127,184,255
+						}
+					}
+				}
+				Item
+				{
+					name = YlOrRd
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,255,204,255|255,237,160,255|254,217,118,255|254,178,76,255|253,141,60,255|252,78,42,255|227,26,28,255|189,0,38,255|128,0,38,255
+						}
+						Item
+						{
+							Colors = 255,255,204,255|255,237,160,255|254,217,118,255|254,178,76,255|253,141,60,255|252,78,42,255|227,26,28,255|177,0,38,255
+						}
+						Item
+						{
+							Colors = 255,255,178,255|254,217,118,255|254,178,76,255|253,141,60,255|252,78,42,255|227,26,28,255|177,0,38,255
+						}
+						Item
+						{
+							Colors = 255,255,178,255|254,217,118,255|254,178,76,255|253,141,60,255|240,59,32,255|189,0,38,255
+						}
+						Item
+						{
+							Colors = 255,255,178,255|254,204,92,255|253,141,60,255|240,59,32,255|189,0,38,255
+						}
+						Item
+						{
+							Colors = 255,255,178,255|254,204,92,255|253,141,60,255|227,26,28,255
+						}
+						Item
+						{
+							Colors = 255,237,160,255|254,178,76,255|240,59,32,255
+						}
+					}
+				}
+				Item
+				{
+					name = PuRd
+					Palettes
+					{
+						Item
+						{
+							Colors = 247,244,249,255|231,225,239,255|212,185,218,255|201,148,199,255|223,101,176,255|231,41,138,255|206,18,86,255|152,0,67,255|103,0,31,255
+						}
+						Item
+						{
+							Colors = 247,244,249,255|231,225,239,255|212,185,218,255|201,148,199,255|223,101,176,255|231,41,138,255|206,18,86,255|145,0,63,255
+						}
+						Item
+						{
+							Colors = 241,238,246,255|212,185,218,255|201,148,199,255|223,101,176,255|231,41,138,255|206,18,86,255|145,0,63,255
+						}
+						Item
+						{
+							Colors = 241,238,246,255|212,185,218,255|201,148,199,255|223,101,176,255|221,28,119,255|152,0,67,255
+						}
+						Item
+						{
+							Colors = 241,238,246,255|215,181,216,255|223,101,176,255|221,28,119,255|152,0,67,255
+						}
+						Item
+						{
+							Colors = 241,238,246,255|215,181,216,255|223,101,176,255|206,18,86,255
+						}
+						Item
+						{
+							Colors = 231,225,239,255|201,148,199,255|221,28,119,255
+						}
+					}
+				}
+				Item
+				{
+					name = Blues
+					Palettes
+					{
+						Item
+						{
+							Colors = 247,251,255,255|222,235,247,255|198,219,239,255|158,202,225,255|107,174,214,255|66,146,198,255|33,113,181,255|8,81,156,255|8,48,107,255
+						}
+						Item
+						{
+							Colors = 247,251,255,255|222,235,247,255|198,219,239,255|158,202,225,255|107,174,214,255|66,146,198,255|33,113,181,255|8,69,148,255
+						}
+						Item
+						{
+							Colors = 239,243,255,255|198,219,239,255|158,202,225,255|107,174,214,255|66,146,198,255|33,113,181,255|8,69,148,255
+						}
+						Item
+						{
+							Colors = 239,243,255,255|198,219,239,255|158,202,225,255|107,174,214,255|49,130,189,255|8,81,156,255
+						}
+						Item
+						{
+							Colors = 239,243,255,255|189,215,231,255|107,174,214,255|49,130,189,255|8,81,156,255
+						}
+						Item
+						{
+							Colors = 239,243,255,255|189,215,231,255|107,174,214,255|33,113,181,255
+						}
+						Item
+						{
+							Colors = 222,235,247,255|158,202,225,255|49,130,189,255
+						}
+					}
+				}
+				Item
+				{
+					name = PuBuGn
+					Palettes
+					{
+						Item
+						{
+							Colors = 255,247,251,255|236,226,240,255|208,209,230,255|166,189,219,255|103,169,207,255|54,144,192,255|2,129,138,255|1,108,89,255|1,70,54,255
+						}
+						Item
+						{
+							Colors = 255,247,251,255|236,226,240,255|208,209,230,255|166,189,219,255|103,169,207,255|54,144,192,255|2,129,138,255|1,100,80,255
+						}
+						Item
+						{
+							Colors = 246,239,247,255|208,209,230,255|166,189,219,255|103,169,207,255|54,144,192,255|2,129,138,255|1,100,80,255
+						}
+						Item
+						{
+							Colors = 246,239,247,255|208,209,230,255|166,189,219,255|103,169,207,255|28,144,153,255|1,108,89,255
+						}
+						Item
+						{
+							Colors = 246,239,247,255|189,201,225,255|103,169,207,255|28,144,153,255|1,108,89,255
+						}
+						Item
+						{
+							Colors = 246,239,247,255|189,201,225,255|103,169,207,255|2,129,138,255
+						}
+						Item
+						{
+							Colors = 236,226,240,255|166,189,219,255|28,144,153,255
+						}
+					}
+				}
+			}
+		}
+		Item
+		{
+			name = Qualitative
+			PaletteGroups
+			{
+				Item
+				{
+					name = Set2
+					Palettes
+					{
+						Item
+						{
+							Colors = 102,194,165,255|252,141,98,255|141,160,203,255|231,138,195,255|166,216,84,255|255,217,47,255|229,196,148,255|179,179,179,255
+						}
+						Item
+						{
+							Colors = 102,194,165,255|252,141,98,255|141,160,203,255|231,138,195,255|166,216,84,255|255,217,47,255|229,196,148,255
+						}
+						Item
+						{
+							Colors = 102,194,165,255|252,141,98,255|141,160,203,255|231,138,195,255|166,216,84,255|255,217,47,255
+						}
+						Item
+						{
+							Colors = 102,194,165,255|252,141,98,255|141,160,203,255|231,138,195,255|166,216,84,255
+						}
+						Item
+						{
+							Colors = 102,194,165,255|252,141,98,255|141,160,203,255|231,138,195,255
+						}
+						Item
+						{
+							Colors = 102,194,165,255|252,141,98,255|141,160,203,255
+						}
+					}
+				}
+				Item
+				{
+					name = Accent
+					Palettes
+					{
+						Item
+						{
+							Colors = 127,201,127,255|190,174,212,255|253,192,134,255|255,255,153,255|56,108,176,255|240,2,127,255|191,91,23,255|102,102,102,255
+						}
+						Item
+						{
+							Colors = 127,201,127,255|190,174,212,255|253,192,134,255|255,255,153,255|56,108,176,255|240,2,127,255|191,91,23,255
+						}
+						Item
+						{
+							Colors = 127,201,127,255|190,174,212,255|253,192,134,255|255,255,153,255|56,108,176,255|240,2,127,255
+						}
+						Item
+						{
+							Colors = 127,201,127,255|190,174,212,255|253,192,134,255|255,255,153,255|56,108,176,255
+						}
+						Item
+						{
+							Colors = 127,201,127,255|190,174,212,255|253,192,134,255|255,255,153,255
+						}
+						Item
+						{
+							Colors = 127,201,127,255|190,174,212,255|253,192,134,255
+						}
+					}
+				}
+				Item
+				{
+					name = Set1
+					Palettes
+					{
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255|152,78,163,255|255,127,0,255|255,255,51,255|166,86,40,255|247,129,191,255|153,153,153,255
+						}
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255|152,78,163,255|255,127,0,255|255,255,51,255|166,86,40,255|247,129,191,255
+						}
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255|152,78,163,255|255,127,0,255|255,255,51,255|166,86,40,255
+						}
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255|152,78,163,255|255,127,0,255|255,255,51,255
+						}
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255|152,78,163,255|255,127,0,255
+						}
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255|152,78,163,255
+						}
+						Item
+						{
+							Colors = 228,26,28,255|55,126,184,255|77,175,74,255
+						}
+					}
+				}
+				Item
+				{
+					name = Set3
+					Palettes
+					{
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255|179,222,105,255|252,205,229,255|217,217,217,255|188,128,189,255|204,235,197,255|255,237,111,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255|179,222,105,255|252,205,229,255|217,217,217,255|188,128,189,255|204,235,197,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255|179,222,105,255|252,205,229,255|217,217,217,255|188,128,189,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255|179,222,105,255|252,205,229,255|217,217,217,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255|179,222,105,255|252,205,229,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255|179,222,105,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255|253,180,98,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255|128,177,211,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255|251,128,114,255
+						}
+						Item
+						{
+							Colors = 141,211,199,255|255,255,179,255|190,186,218,255
+						}
+					}
+				}
+				Item
+				{
+					name = Dark2
+					Palettes
+					{
+						Item
+						{
+							Colors = 27,158,119,255|217,95,2,255|117,112,179,255|231,41,138,255|102,166,30,255|230,171,2,255|166,118,29,255|102,102,102,255
+						}
+						Item
+						{
+							Colors = 27,158,119,255|217,95,2,255|117,112,179,255|231,41,138,255|102,166,30,255|230,171,2,255|166,118,29,255
+						}
+						Item
+						{
+							Colors = 27,158,119,255|217,95,2,255|117,112,179,255|231,41,138,255|102,166,30,255|230,171,2,255
+						}
+						Item
+						{
+							Colors = 27,158,119,255|217,95,2,255|117,112,179,255|231,41,138,255|102,166,30,255
+						}
+						Item
+						{
+							Colors = 27,158,119,255|217,95,2,255|117,112,179,255|231,41,138,255
+						}
+						Item
+						{
+							Colors = 27,158,119,255|217,95,2,255|117,112,179,255
+						}
+					}
+				}
+				Item
+				{
+					name = Paired
+					Palettes
+					{
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255|253,191,111,255|255,127,0,255|202,178,214,255|106,61,154,255|255,255,153,255|177,89,40,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255|253,191,111,255|255,127,0,255|202,178,214,255|106,61,154,255|255,255,153,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255|253,191,111,255|255,127,0,255|202,178,214,255|106,61,154,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255|253,191,111,255|255,127,0,255|202,178,214,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255|253,191,111,255|255,127,0,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255|253,191,111,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255|227,26,28,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255|251,154,153,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255|51,160,44,255
+						}
+						Item
+						{
+							Colors = 166,206,227,255|31,120,180,255|178,223,138,255
+						}
+					}
+				}
+				Item
+				{
+					name = Pastel2
+					Palettes
+					{
+						Item
+						{
+							Colors = 179,226,205,255|253,205,172,255|203,213,232,255|244,202,228,255|230,245,201,255|255,242,174,255|241,226,204,255|204,204,204,255
+						}
+						Item
+						{
+							Colors = 179,226,205,255|253,205,172,255|203,213,232,255|244,202,228,255|230,245,201,255|255,242,174,255|241,226,204,255
+						}
+						Item
+						{
+							Colors = 179,226,205,255|253,205,172,255|203,213,232,255|244,202,228,255|230,245,201,255|255,242,174,255
+						}
+						Item
+						{
+							Colors = 179,226,205,255|253,205,172,255|203,213,232,255|244,202,228,255|230,245,201,255
+						}
+						Item
+						{
+							Colors = 179,226,205,255|253,205,172,255|203,213,232,255|244,202,228,255
+						}
+						Item
+						{
+							Colors = 179,226,205,255|253,205,172,255|203,213,232,255
+						}
+					}
+				}
+				Item
+				{
+					name = Pastel1
+					Palettes
+					{
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255|222,203,228,255|254,217,166,255|255,255,204,255|229,216,189,255|253,218,236,255|242,242,242,255
+						}
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255|222,203,228,255|254,217,166,255|255,255,204,255|229,216,189,255|253,218,236,255
+						}
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255|222,203,228,255|254,217,166,255|255,255,204,255|229,216,189,255
+						}
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255|222,203,228,255|254,217,166,255|255,255,204,255
+						}
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255|222,203,228,255|254,217,166,255
+						}
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255|222,203,228,255
+						}
+						Item
+						{
+							Colors = 251,180,174,255|179,205,227,255|204,235,197,255
+						}
+					}
+				}
+			}
+		}
+		Item
+		{
+			name = Diverging
+			PaletteGroups
+			{
+				Item
+				{
+					name = Spectral
+					Palettes
+					{
+						Item
+						{
+							Colors = 158,1,66,255|213,62,79,255|244,109,67,255|253,174,97,255|254,224,139,255|255,255,191,255|230,245,152,255|171,221,164,255|102,194,165,255|50,136,189,255|94,79,162,255
+						}
+						Item
+						{
+							Colors = 158,1,66,255|213,62,79,255|244,109,67,255|253,174,97,255|254,224,139,255|230,245,152,255|171,221,164,255|102,194,165,255|50,136,189,255|94,79,162,255
+						}
+						Item
+						{
+							Colors = 213,62,79,255|244,109,67,255|253,174,97,255|254,224,139,255|255,255,191,255|230,245,152,255|171,221,164,255|102,194,165,255|50,136,189,255
+						}
+						Item
+						{
+							Colors = 213,62,79,255|244,109,67,255|253,174,97,255|254,224,139,255|230,245,152,255|171,221,164,255|102,194,165,255|50,136,189,255
+						}
+						Item
+						{
+							Colors = 213,62,79,255|252,141,89,255|254,224,139,255|255,255,191,255|230,245,152,255|153,213,148,255|50,136,189,255
+						}
+						Item
+						{
+							Colors = 213,62,79,255|252,141,89,255|254,224,139,255|230,245,152,255|153,213,148,255|50,136,189,255
+						}
+						Item
+						{
+							Colors = 215,25,28,255|253,174,97,255|255,255,191,255|171,221,164,255|43,131,186,255
+						}
+						Item
+						{
+							Colors = 215,25,28,255|253,174,97,255|171,221,164,255|43,131,186,255
+						}
+						Item
+						{
+							Colors = 252,141,89,255|255,255,191,255|153,213,148,255
+						}
+					}
+				}
+				Item
+				{
+					name = RdYlGn
+					Palettes
+					{
+						Item
+						{
+							Colors = 165,0,38,255|215,48,39,255|244,109,67,255|253,174,97,255|254,224,139,255|255,255,191,255|217,239,139,255|166,217,106,255|102,189,99,255|26,152,80,255|0,104,55,255
+						}
+						Item
+						{
+							Colors = 165,0,38,255|215,48,39,255|244,109,67,255|253,174,97,255|254,224,139,255|217,239,139,255|166,217,106,255|102,189,99,255|26,152,80,255|0,104,55,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|244,109,67,255|253,174,97,255|254,224,139,255|255,255,191,255|217,239,139,255|166,217,106,255|102,189,99,255|26,152,80,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|244,109,67,255|253,174,97,255|254,224,139,255|217,239,139,255|166,217,106,255|102,189,99,255|26,152,80,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|252,141,89,255|254,224,139,255|255,255,191,255|217,239,139,255|145,207,96,255|26,152,80,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|252,141,89,255|254,224,139,255|217,239,139,255|145,207,96,255|26,152,80,255
+						}
+						Item
+						{
+							Colors = 215,25,28,255|253,174,97,255|255,255,191,255|166,217,106,255|26,150,65,255
+						}
+						Item
+						{
+							Colors = 215,25,28,255|253,174,97,255|166,217,106,255|26,150,65,255
+						}
+						Item
+						{
+							Colors = 252,141,89,255|255,255,191,255|145,207,96,255
+						}
+					}
+				}
+				Item
+				{
+					name = RdBu
+					Palettes
+					{
+						Item
+						{
+							Colors = 103,0,31,255|178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|247,247,247,255|209,229,240,255|146,197,222,255|67,147,195,255|33,102,172,255|5,48,97,255
+						}
+						Item
+						{
+							Colors = 103,0,31,255|178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|209,229,240,255|146,197,222,255|67,147,195,255|33,102,172,255|5,48,97,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|247,247,247,255|209,229,240,255|146,197,222,255|67,147,195,255|33,102,172,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|209,229,240,255|146,197,222,255|67,147,195,255|33,102,172,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|239,138,98,255|253,219,199,255|247,247,247,255|209,229,240,255|103,169,207,255|33,102,172,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|239,138,98,255|253,219,199,255|209,229,240,255|103,169,207,255|33,102,172,255
+						}
+						Item
+						{
+							Colors = 202,0,32,255|244,165,130,255|247,247,247,255|146,197,222,255|5,113,176,255
+						}
+						Item
+						{
+							Colors = 202,0,32,255|244,165,130,255|146,197,222,255|5,113,176,255
+						}
+						Item
+						{
+							Colors = 239,138,98,255|247,247,247,255|103,169,207,255
+						}
+					}
+				}
+				Item
+				{
+					name = PiYG
+					Palettes
+					{
+						Item
+						{
+							Colors = 142,1,82,255|197,27,125,255|222,119,174,255|241,182,218,255|253,224,239,255|247,247,247,255|230,245,208,255|184,225,134,255|127,188,65,255|77,146,33,255|39,100,25,255
+						}
+						Item
+						{
+							Colors = 142,1,82,255|197,27,125,255|222,119,174,255|241,182,218,255|253,224,239,255|230,245,208,255|184,225,134,255|127,188,65,255|77,146,33,255|39,100,25,255
+						}
+						Item
+						{
+							Colors = 197,27,125,255|222,119,174,255|241,182,218,255|253,224,239,255|247,247,247,255|230,245,208,255|184,225,134,255|127,188,65,255|77,146,33,255
+						}
+						Item
+						{
+							Colors = 197,27,125,255|222,119,174,255|241,182,218,255|253,224,239,255|230,245,208,255|184,225,134,255|127,188,65,255|77,146,33,255
+						}
+						Item
+						{
+							Colors = 197,27,125,255|233,163,201,255|253,224,239,255|247,247,247,255|230,245,208,255|161,215,106,255|77,146,33,255
+						}
+						Item
+						{
+							Colors = 197,27,125,255|233,163,201,255|253,224,239,255|230,245,208,255|161,215,106,255|77,146,33,255
+						}
+						Item
+						{
+							Colors = 208,28,139,255|241,182,218,255|247,247,247,255|184,225,134,255|77,172,38,255
+						}
+						Item
+						{
+							Colors = 208,28,139,255|241,182,218,255|184,225,134,255|77,172,38,255
+						}
+						Item
+						{
+							Colors = 233,163,201,255|247,247,247,255|161,215,106,255
+						}
+					}
+				}
+				Item
+				{
+					name = PRGn
+					Palettes
+					{
+						Item
+						{
+							Colors = 64,0,75,255|118,42,131,255|153,112,171,255|194,165,207,255|231,212,232,255|247,247,247,255|217,240,211,255|166,219,160,255|90,174,97,255|27,120,55,255|0,68,27,255
+						}
+						Item
+						{
+							Colors = 64,0,75,255|118,42,131,255|153,112,171,255|194,165,207,255|231,212,232,255|217,240,211,255|166,219,160,255|90,174,97,255|27,120,55,255|0,68,27,255
+						}
+						Item
+						{
+							Colors = 118,42,131,255|153,112,171,255|194,165,207,255|231,212,232,255|247,247,247,255|217,240,211,255|166,219,160,255|90,174,97,255|27,120,55,255
+						}
+						Item
+						{
+							Colors = 118,42,131,255|153,112,171,255|194,165,207,255|231,212,232,255|217,240,211,255|166,219,160,255|90,174,97,255|27,120,55,255
+						}
+						Item
+						{
+							Colors = 118,42,131,255|175,141,195,255|231,212,232,255|247,247,247,255|217,240,211,255|127,191,123,255|27,120,55,255
+						}
+						Item
+						{
+							Colors = 118,42,131,255|175,141,195,255|231,212,232,255|217,240,211,255|127,191,123,255|27,120,55,255
+						}
+						Item
+						{
+							Colors = 123,50,148,255|194,165,207,255|247,247,247,255|166,219,160,255|0,136,55,255
+						}
+						Item
+						{
+							Colors = 123,50,148,255|194,165,207,255|166,219,160,255|0,136,55,255
+						}
+						Item
+						{
+							Colors = 175,141,195,255|247,247,247,255|127,191,123,255
+						}
+					}
+				}
+				Item
+				{
+					name = RdYlBu
+					Palettes
+					{
+						Item
+						{
+							Colors = 165,0,38,255|215,48,39,255|244,109,67,255|253,174,97,255|254,224,144,255|255,255,191,255|224,243,248,255|171,217,233,255|116,173,209,255|69,117,180,255|49,54,149,255
+						}
+						Item
+						{
+							Colors = 165,0,38,255|215,48,39,255|244,109,67,255|253,174,97,255|254,224,144,255|224,243,248,255|171,217,233,255|116,173,209,255|69,117,180,255|49,54,149,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|244,109,67,255|253,174,97,255|254,224,144,255|255,255,191,255|224,243,248,255|171,217,233,255|116,173,209,255|69,117,180,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|244,109,67,255|253,174,97,255|254,224,144,255|224,243,248,255|171,217,233,255|116,173,209,255|69,117,180,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|252,141,89,255|254,224,144,255|255,255,191,255|224,243,248,255|145,191,219,255|69,117,180,255
+						}
+						Item
+						{
+							Colors = 215,48,39,255|252,141,89,255|254,224,144,255|224,243,248,255|145,191,219,255|69,117,180,255
+						}
+						Item
+						{
+							Colors = 215,25,28,255|253,174,97,255|255,255,191,255|171,217,233,255|44,123,182,255
+						}
+						Item
+						{
+							Colors = 215,25,28,255|253,174,97,255|171,217,233,255|44,123,182,255
+						}
+						Item
+						{
+							Colors = 252,141,89,255|255,255,191,255|145,191,219,255
+						}
+					}
+				}
+				Item
+				{
+					name = BrBG
+					Palettes
+					{
+						Item
+						{
+							Colors = 84,48,5,255|140,81,10,255|191,129,45,255|223,194,125,255|246,232,195,255|245,245,245,255|199,234,229,255|128,205,193,255|53,151,143,255|1,102,94,255|0,60,48,255
+						}
+						Item
+						{
+							Colors = 84,48,5,255|140,81,10,255|191,129,45,255|223,194,125,255|246,232,195,255|199,234,229,255|128,205,193,255|53,151,143,255|1,102,94,255|0,60,48,255
+						}
+						Item
+						{
+							Colors = 140,81,10,255|191,129,45,255|223,194,125,255|246,232,195,255|245,245,245,255|199,234,229,255|128,205,193,255|53,151,143,255|1,102,94,255
+						}
+						Item
+						{
+							Colors = 140,81,10,255|191,129,45,255|223,194,125,255|246,232,195,255|199,234,229,255|128,205,193,255|53,151,143,255|1,102,94,255
+						}
+						Item
+						{
+							Colors = 140,81,10,255|216,179,101,255|246,232,195,255|245,245,245,255|199,234,229,255|90,180,172,255|1,102,94,255
+						}
+						Item
+						{
+							Colors = 140,81,10,255|216,179,101,255|246,232,195,255|199,234,229,255|90,180,172,255|1,102,94,255
+						}
+						Item
+						{
+							Colors = 166,97,26,255|223,194,125,255|245,245,245,255|128,205,193,255|1,133,113,255
+						}
+						Item
+						{
+							Colors = 166,97,26,255|223,194,125,255|128,205,193,255|1,133,113,255
+						}
+						Item
+						{
+							Colors = 216,179,101,255|245,245,245,255|90,180,172,255
+						}
+					}
+				}
+				Item
+				{
+					name = RdGy
+					Palettes
+					{
+						Item
+						{
+							Colors = 103,0,31,255|178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|255,255,255,255|224,224,224,255|186,186,186,255|135,135,135,255|77,77,77,255|26,26,26,255
+						}
+						Item
+						{
+							Colors = 103,0,31,255|178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|224,224,224,255|186,186,186,255|135,135,135,255|77,77,77,255|26,26,26,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|255,255,255,255|224,224,224,255|186,186,186,255|135,135,135,255|77,77,77,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|214,96,77,255|244,165,130,255|253,219,199,255|224,224,224,255|186,186,186,255|135,135,135,255|77,77,77,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|239,138,98,255|253,219,199,255|255,255,255,255|224,224,224,255|153,153,153,255|77,77,77,255
+						}
+						Item
+						{
+							Colors = 178,24,43,255|239,138,98,255|253,219,199,255|224,224,224,255|153,153,153,255|77,77,77,255
+						}
+						Item
+						{
+							Colors = 202,0,32,255|244,165,130,255|255,255,255,255|186,186,186,255|64,64,64,255
+						}
+						Item
+						{
+							Colors = 202,0,32,255|244,165,130,255|186,186,186,255|64,64,64,255
+						}
+						Item
+						{
+							Colors = 239,138,98,255|255,255,255,255|153,153,153,255
+						}
+					}
+				}
+				Item
+				{
+					name = PuOr
+					Palettes
+					{
+						Item
+						{
+							Colors = 127,59,8,255|179,88,6,255|224,130,20,255|253,184,99,255|254,224,182,255|247,247,247,255|216,218,235,255|178,171,210,255|128,115,172,255|84,39,136,255|45,0,75,255
+						}
+						Item
+						{
+							Colors = 127,59,8,255|179,88,6,255|224,130,20,255|253,184,99,255|254,224,182,255|216,218,235,255|178,171,210,255|128,115,172,255|84,39,136,255|45,0,75,255
+						}
+						Item
+						{
+							Colors = 179,88,6,255|224,130,20,255|253,184,99,255|254,224,182,255|247,247,247,255|216,218,235,255|178,171,210,255|128,115,172,255|84,39,136,255
+						}
+						Item
+						{
+							Colors = 179,88,6,255|224,130,20,255|253,184,99,255|254,224,182,255|216,218,235,255|178,171,210,255|128,115,172,255|84,39,136,255
+						}
+						Item
+						{
+							Colors = 179,88,6,255|241,163,64,255|254,224,182,255|247,247,247,255|216,218,235,255|153,142,195,255|84,39,136,255
+						}
+						Item
+						{
+							Colors = 179,88,6,255|241,163,64,255|254,224,182,255|216,218,235,255|153,142,195,255|84,39,136,255
+						}
+						Item
+						{
+							Colors = 230,97,1,255|253,184,99,255|247,247,247,255|178,171,210,255|94,60,153,255
+						}
+						Item
+						{
+							Colors = 230,97,1,255|253,184,99,255|178,171,210,255|94,60,153,255
+						}
+						Item
+						{
+							Colors = 241,163,64,255|247,247,247,255|153,142,195,255
+						}
+					}
+				}
+			}
+		}
+	}
+}

From 5828eebb50bbf87e4d1e62ed66e071102fbe6fd4 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:07:44 -0400
Subject: [PATCH 18/29] Localized science results file

---
 SCANassets/Resources/ScienceDefs.cfg | 164 +++++++++++++--------------
 1 file changed, 82 insertions(+), 82 deletions(-)

diff --git a/SCANassets/Resources/ScienceDefs.cfg b/SCANassets/Resources/ScienceDefs.cfg
index 068b730ed..c3dd8f099 100644
--- a/SCANassets/Resources/ScienceDefs.cfg
+++ b/SCANassets/Resources/ScienceDefs.cfg
@@ -1,7 +1,7 @@
 EXPERIMENT_DEFINITION
 {	
 	id = SCANsatAltimetryLoRes
-	title = Low Resolution Altimetry Scan
+	title = #autoLOC_SCANsat_Science_Lo_Title
 	baseValue = 10
 	scienceCap = 10
 	dataScale = 2
@@ -12,31 +12,31 @@ EXPERIMENT_DEFINITION
 	
 	RESULTS
 	{
-		default = Analyzed low resolution altimetry data.
-		default = "RADAR Altimetry Sensor is reporting in. I don't know how, but we have a strong signal and are getting data. This calls for a celebratory round of snacks!"
-		Sun = You wonder if the sensor is malfunctioning.
-		Moho = Well, at least this low resolution data makes Moho look kind of cool. Not quite giant lakes of lava, but still cool.
-		Eve = You contemplate the grainy, rough altitude estimates returned by the scanner and wish that you had sent the high resolution scanner instead. Oh well, it's a great reason to launch more rockets! (As if we really needed a reason anyway)
-		Gilly = Your low resolution scanning confirms what you already knew: Gilly is just a lumpy rock floating in space. At least you don't have to strain your eyes looking at the report.
-		Kerbin = Even this low resolution data of the planets surface is amazingly useful. You can't wait to deploy this technology on the Mun or beyond.
-		Mun = The data shows broad, sweeping strokes of the landscape below. A high resolution scan would be more helpful, but you can probably find a suitable landing site using this data.
-		Minmus = You grudgingly acknowledge that the guys over at the Kerbal Astronomical Society were right: Minmus really is a moon. You wouldn't have believed it if you hadn't seen the altimetry scan with your own eyes.
-		Duna = This low resolution data is a bit grainy and distorted, but it will still be invaluable in searching for a proper landing site on Duna. Suddenly a long-term Duna mission just became a real prospect.
-		Ike = As you pore over the data you are struck by how similar Ike appears to the Mun. You wonder about their comparative surface geology.
-		Dres = Even with the low resolution scanner it is quite apparent that Dres has some prominent mountains. You can't wait for the resource scan results because you're sure "there's gold in them their hills".
-		Jool = Altimetry, what altimetry? It's a gas giant for Kerbal's sake. Let's just pick a number at random and call it good.
-		Laythe = The sensor seems unable to penetrate the water.
-		Vall = Well, here it is: "The data you Vall been waiting for! Hahahahaha! Hahaha. Ha. Ha? What, SOMEONE has to find that funny."
-		Tylo = You're still not sure what the view from the surface with Laythe, Vall, and Jool overhead would be like, but this data will sure help you find a landing site so that you can find out.
-		Bop = Well, the low resolution altimetry data is in, and you decide to package it up and send it back to KSC. You just hope that there is enough juice left in the batteries to get it all sent and keep basic systems running at the same time.
-		Pol = The low resolution scan confirms that Pol does indeed look like a giant pollen grain. Until you upgrade to a high resolution scan, and advance the field of electron microscopy, you will still be left with the question of how strong this resemblance truly is.
-		Eeloo = The scientists back on Kerbin have been waiting for this data for a long time. No doubt there will be celebrations and snacks for all when it gets there.
+		default = #autoLOC_SCANsat_Science_Lo_Default1
+		default = #autoLOC_SCANsat_Science_Lo_Default2
+		Sun = #autoLOC_SCANsat_Science_Lo_Sun
+		Moho = #autoLOC_SCANsat_Science_Lo_Moho
+		Eve = #autoLOC_SCANsat_Science_Lo_Eve
+		Gilly = #autoLOC_SCANsat_Science_Lo_Gilly
+		Kerbin = #autoLOC_SCANsat_Science_Lo_Kerbin
+		Mun = #autoLOC_SCANsat_Science_Lo_Mun
+		Minmus = #autoLOC_SCANsat_Science_Lo_Minmus
+		Duna = #autoLOC_SCANsat_Science_Lo_Duna
+		Ike = #autoLOC_SCANsat_Science_Lo_Ike
+		Dres = #autoLOC_SCANsat_Science_Lo_Dres
+		Jool = #autoLOC_SCANsat_Science_Lo_Jool
+		Laythe = #autoLOC_SCANsat_Science_Lo_Laythe
+		Vall = #autoLOC_SCANsat_Science_Lo_Vall
+		Tylo = #autoLOC_SCANsat_Science_Lo_Tylo
+		Bop = #autoLOC_SCANsat_Science_Lo_Bop
+		Pol = #autoLOC_SCANsat_Science_Lo_Pol
+		Eeloo = #autoLOC_SCANsat_Science_Lo_Eeloo
 	}
 }
 EXPERIMENT_DEFINITION
 {	
 	id = SCANsatAltimetryHiRes
-	title = High Resolution Altimetry Scan
+	title = #autoLOC_SCANsat_Science_Hi_Title
 	baseValue = 20
 	scienceCap = 20
 	dataScale = 4
@@ -47,31 +47,31 @@ EXPERIMENT_DEFINITION
 	
 	RESULTS
 	{
-		default = Analyzed high resolution altimetry data.
-		default = "The High Resolution Altimetry Scan definitely is better then the low resolution one. SCAN has once again proven their scanning skills."
-		Sun = You realize that you could have saved some money if you had trusted the low resolution sensor in the first place.
-		Moho = Finally, the awesomeness has returned to Moho! It may not be giant flowing rivers of lava, but this data is spectacular!
-		Eve = The high resolution sensor cut through the hazy purple atmosphere well, and you are able to distinguish minute details on the surface. The scientists back at KSC will be relieved.
-		Gilly = Even in super-high resolution Gilly somehow seems to be in low resolution. That is one seriously lumpy surface.
-		Kerbin = You become mesmerised by all the colors in the data that the new high resolution technology provides. Suddenly Mission Control awakes you from your stupor, and you quickly wipe the drool from the corner of your mouth.
-		Mun = "Hah! No more boring grey moon. Just look at all the colors in that scan! Now we can really pinpoint a prime landing site."
-		Minmus = Wow, not only is Minmus real, it has some amazing topography! You can't wait to land in one of those flat areas.
-		Duna = This high resolution data is amazing. You begin analyzing the hills and valleys, searching for the perfect landing spot.
-		Ike = The data confirms the presence of large sloping hills and craters. Hopefully the analysts back at KSC can use this to find a suitable landing place.
-		Dres = Those... are some serious mountains. You are glad to be analysing this data, rather than trying to climb up some of those hills.
-		Jool = Even in high resolution there does not appear to be a surface on Jool. So much for that theory. At least we still have the grant money!
-		Laythe = The map shows mostly negative heights. You consider draining Laythe just so you can climb its mountains.
-		Vall = The data from the high resolution scanner confirms that the surface of Vall is, indeed, "crinkly". Guess Gene owes you fifty funds.
-		Tylo = Tylo may have been the first of Jool's moons to be discovered, but this data makes it feel like you are discovering the moon for the first time.
-		Bop = Wow, look at all those colors. You have no idea what all that data means, but you're sure that this high resolution data will impress everyone back at KSC.
-		Pol = Even with this amount of high-quality data it is still difficult to find a suitable landing site. How the heck was this moon made, anyway?
-		Eeloo = The cracks and fissures on the surface stand out in striking detail as you examine the data from the SAR Altimetry Sensor. Just look at all those potential landing sites.
+		default = #autoLOC_SCANsat_Science_Hi_Default1
+		default = #autoLOC_SCANsat_Science_Hi_Default2
+		Sun = #autoLOC_SCANsat_Science_Hi_Sun
+		Moho = #autoLOC_SCANsat_Science_Hi_Moho
+		Eve = #autoLOC_SCANsat_Science_Hi_Eve
+		Gilly = #autoLOC_SCANsat_Science_Hi_Gilly
+		Kerbin = #autoLOC_SCANsat_Science_Hi_Kerbin
+		Mun = #autoLOC_SCANsat_Science_Hi_Mun
+		Minmus = #autoLOC_SCANsat_Science_Hi_Minmus
+		Duna = #autoLOC_SCANsat_Science_Hi_Duna
+		Ike = #autoLOC_SCANsat_Science_Hi_Ike
+		Dres = #autoLOC_SCANsat_Science_Hi_Dres
+		Jool = #autoLOC_SCANsat_Science_Hi_Jool
+		Laythe = #autoLOC_SCANsat_Science_Hi_Laythe
+		Vall = #autoLOC_SCANsat_Science_Hi_Vall
+		Tylo = #autoLOC_SCANsat_Science_Hi_Tylo
+		Bop = #autoLOC_SCANsat_Science_Hi_Bop
+		Pol = #autoLOC_SCANsat_Science_Hi_Pol
+		Eeloo = #autoLOC_SCANsat_Science_Hi_Eeloo
 	}
 }
 EXPERIMENT_DEFINITION
 {	
 	id = SCANsatBiomeAnomaly
-	title = Multispectral Analysis
+	title = #autoLOC_SCANsat_Science_Multi_Title
 	baseValue = 15
 	scienceCap = 15
 	dataScale = 3
@@ -82,33 +82,33 @@ EXPERIMENT_DEFINITION
 	
 	RESULTS
 	{
-		default = Analyzed multispectral sensor data.
-		default = "Wow, how are we even receiving this data right now? Those SCAN engineers really know what they are doing. Either that or they have not the slightest idea what they are doing. Either way, it's time for some snacks!"
-		Sun = You are surprised by the lack of biometric data.
-		Sun = you wonder why there are no poles visible on the biome map.
-		Moho = As you pore through the data you wonder if you will find the elusive lava lake biome that so many scientists had speculated about.
-		Eve = The intricately swirled lines of Eve's biome map remind you of lava lamps and tie dyed shirts. Man those were the days. Next spacecraft to Eve will have a mandatory disco ball!
-		Gilly = Even with all that squinting those astronomers couldn't see the biomes here. Hah! Dumb astronomers! That's 1 point for science and 0 points for uhhhh... science.
-		Kerbin = This biome data is truly astounding. You just hope that it is crumb-resistant, as you remember eating a particularly messy box of snacks the day that the sensor was installed.
-		Mun = Huh, never knew the moon had biomes. Wonder which one the cheese is in. And if there are any other snacks there as well.
-		Minmus = You contemplate how fitting the name "Greater Flats" is as you pore over the data. Whoever thinks up these names is one smart Kerbal, unlike the engineers we have around here.
-		Duna = You comb through the biome data looking for just the right spot to gather all that sweet, sweet science data from. Mmmmm, science... and snacks.
-		Ike = As you pore over the data coming back from Ike you are surprised at the biome diversity. After all it's just a moon. You can't wait to get your hands on some of the scientific data locked up down there.
-		Dres = Poles, check. Highlands, check. Midlands, check. Lowlands, check. Ridges, check. Impact Ejecta, check. Impact Craters, check. Canyons, check. I think we got it all. Time to shut down the scanner and have some snacks!
-		Jool = You are surprised by the lack of biometric data.
-		Jool = you wonder why there are no poles visible on the biome map.
-		Laythe = You want to throw a party every time the sensor detects a land biome.
-		Vall = Pretty straightforward data: Poles, Highlands, Midlands, and Lowlands. That's a wrap. Now let's have some snacks!
-		Tylo = You are struck by the diversity of the biomes in the report. Not only is Tylo cool to look up from, it's cool to look down at too.
-		Bop = This detailed analysis of Bop's biomes will advance our understanding of the little moon beyond anything we could have hoped. It's been a great day. Snacks all around!
-		Pol = As you take in the biome data coming from Pol you begin to contemplate the possibility that pollen grains have biomes too. Then you quickly squash the thought, knowing what the activists would be like if they got a hold of that idea.
-		Eeloo = It is astounding to have such detailed biome data on a planet so far from Kerbin. You gaze in awe at the report as the data comes in.
+		default = #autoLOC_SCANsat_Science_Multi_Default1
+		default = #autoLOC_SCANsat_Science_Multi_Default2
+		Sun = #autoLOC_SCANsat_Science_Multi_Sun1
+		Sun = #autoLOC_SCANsat_Science_Multi_Sun2
+		Moho = #autoLOC_SCANsat_Science_Multi_Moho
+		Eve = #autoLOC_SCANsat_Science_Multi_Eve
+		Gilly = #autoLOC_SCANsat_Science_Multi_Gilly
+		Kerbin = #autoLOC_SCANsat_Science_Multi_Kerbin
+		Mun = #autoLOC_SCANsat_Science_Multi_Mun
+		Minmus = #autoLOC_SCANsat_Science_Multi_Minmus
+		Duna = #autoLOC_SCANsat_Science_Multi_Duna
+		Ike = #autoLOC_SCANsat_Science_Multi_Ike
+		Dres = #autoLOC_SCANsat_Science_Multi_Dres
+		Jool = #autoLOC_SCANsat_Science_Multi_Jool1
+		Jool = autoLOC_SCANsat_Science_Multi_Jool2
+		Laythe = #autoLOC_SCANsat_Science_Multi_Laythe
+		Vall = #autoLOC_SCANsat_Science_Multi_Vall
+		Tylo = #autoLOC_SCANsat_Science_Multi_Tylo
+		Bop = #autoLOC_SCANsat_Science_Multi_Bop
+		Pol = #autoLOC_SCANsat_Science_Multi_Pol
+		Eeloo = #autoLOC_SCANsat_Science_Multi_Eeloo
 	}
 }
 EXPERIMENT_DEFINITION
 {	
 	id = SCANsatResources
-	title = Resources Scan
+	title = #autoLOC_SCANsat_Science_Resource_Title
 	baseValue = 10
 	scienceCap = 10
 	dataScale = 2
@@ -119,24 +119,24 @@ EXPERIMENT_DEFINITION
 	
 	RESULTS
 	{
-		default = Analyzed low resolution resource data.
-		default = "We are receiving resource sensor data now; this information looks way better than what we were getting from that other group..."
-		Sun = Perhaps the sun is not the best place to find surface resources.
-		Moho = We finally have some information about resources on Moho's surface, now we just need to figure out why anyone would want to land there.
-		Eve = We're getting lots of good data on Eve's surface resources, this will be great when we need to figure out how to get off of the planet.
-		Gilly = Initial resource scans of Gilly look interesting; it's almost like asteroid mining.
-		Kerbin = We finally have some data about resources on Kerbin, because, as everyone knows, if you want basic information about your own planet nothing beats sending an expensive, complicated satellite into orbit.
-		Mun = This resource data gives us our first good look at how suitable the Mun may be for mining purposes.
-		Minmus = At last, we have some resource data on Minmus, every Kerbonaut's first choice for a starter mining facility.
-		Duna = This resource data brings us one step closer to reliving all of our favorite lines from that recent hit Kerbal movie.
-		Ike = Ike may not be the solar system's most interesting celestial body, but that doesn't make this resource data any less useful.
-		Dres = We might as well just search some of the nearby asteroids for resources; who would ever want to bother with Dres.
-		Jool = Hmm, maybe a gas giant isn't the best place to go looking for surface resources...
-		Laythe = Well, there's lots of good data here, but precious little area on the surface where we might actually be able to land and take advantage of the resources.
-		Vall = Resource scans of icy Vall provide lots of interesting data.
-		Tylo = We'll take any resource information we can get on scary looking Tylo.
-		Bop = Bop may not be anyone's first choice for deciding where to look for resources, but this data may still come in handy some day.
-		Pol = In addition to pollen grains and strange lumpy things, Pol appears to have some interesting resource deposits.
-		Eeloo = Now that we've made it all the way out to Eeloo, we might as strip mine the place and move on to whatever is beyond.
+		default = #autoLOC_SCANsat_Science_Resource_Default1
+		default = #autoLOC_SCANsat_Science_Resource_Default2
+		Sun = #autoLOC_SCANsat_Science_Resource_Sun
+		Moho = #autoLOC_SCANsat_Science_Resource_Moho
+		Eve = #autoLOC_SCANsat_Science_Resource_Eve
+		Gilly = #autoLOC_SCANsat_Science_Resource_Gilly
+		Kerbin = #autoLOC_SCANsat_Science_Resource_Kerbin
+		Mun = #autoLOC_SCANsat_Science_Resource_Mun
+		Minmus = #autoLOC_SCANsat_Science_Resource_Minmus
+		Duna = #autoLOC_SCANsat_Science_Resource_Duna
+		Ike = #autoLOC_SCANsat_Science_Resource_Ike
+		Dres = #autoLOC_SCANsat_Science_Resource_Dres
+		Jool = #autoLOC_SCANsat_Science_Resource_Jool
+		Laythe = #autoLOC_SCANsat_Science_Resource_Laythe
+		Vall = #autoLOC_SCANsat_Science_Resource_Vall
+		Tylo = #autoLOC_SCANsat_Science_Resource_Tylo
+		Bop = #autoLOC_SCANsat_Science_Resource_Bop
+		Pol = #autoLOC_SCANsat_Science_Resource_Pol
+		Eeloo = #autoLOC_SCANsat_Science_Resource_Eeloo
 	}
 }
\ No newline at end of file

From 7520da77ffce895380dce63c88ad754a0d7495a1 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:11:50 -0400
Subject: [PATCH 19/29] Default max scanner altitude

---
 SCANsat/SCAN_PartModules/SCANresourceDisplay.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs b/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs
index 11a8d7bb4..f3dbf5954 100644
--- a/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs
+++ b/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs
@@ -91,7 +91,7 @@ private void setupFields(ModuleResourceScanner m)
 			}
 			else
 			{
-				MaxAbundanceAltitude = 250000;
+				MaxAbundanceAltitude = 500000;
 				RequiresUnlock = true;
 			}
 

From c9c0b1f85a8fe67704f55f168816ff83d67ce161 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:12:12 -0400
Subject: [PATCH 20/29] Log spam

---
 SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs
index ad1c2415d..bc32ce750 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs
@@ -1571,19 +1571,17 @@ public IList CelestialBodies
 
 					if (SCANcontroller.controller.getData(body.bodyName) != null)
 						bodyList.Add(body.displayName.LocalizeBodyName());
-					SCANUtil.SCANlog("Body: {0} - Orbiting Count: {1}", body.bodyName, body.orbitingBodies.Count);
+
 					for (int j = 0; j < body.orbitingBodies.Count; j++)
 					{
 						CelestialBody moon = body.orbitingBodies[j];
-						SCANUtil.SCANlog("Moon: {0} - Orbiting Count: {1}", moon.bodyName, moon.orbitingBodies.Count);
-
+						
 						if (SCANcontroller.controller.getData(moon.bodyName) != null)
 							bodyList.Add(moon.displayName.LocalizeBodyName());
 
 						for (int k = 0; k < moon.orbitingBodies.Count; k++)
 						{
 							CelestialBody subMoon = moon.orbitingBodies[k];
-							SCANUtil.SCANlog("Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count);
 
 							if (SCANcontroller.controller.getData(subMoon.bodyName) != null)
 								bodyList.Add(subMoon.displayName.LocalizeBodyName());
@@ -1591,7 +1589,6 @@ public IList CelestialBodies
 							for (int l = 0; l < subMoon.orbitingBodies.Count; l++)
 							{
 								CelestialBody subSubMoon = subMoon.orbitingBodies[l];
-								SCANUtil.SCANlog("Sub Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count);
 
 								if (SCANcontroller.controller.getData(subSubMoon.bodyName) != null)
 									bodyList.Add(subSubMoon.displayName.LocalizeBodyName());

From 2d0f9ab1ef7a8ad9b55b12f9f7d767ed36a56510 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:12:32 -0400
Subject: [PATCH 21/29] Set current palette details for color management window

---
 SCANsat/SCAN_Unity/SCAN_UI_Color.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Color.cs b/SCANsat/SCAN_Unity/SCAN_UI_Color.cs
index dfa83b682..48ce9a50f 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_Color.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_Color.cs
@@ -96,7 +96,7 @@ public void Refresh()
 
 			if (currentTerrain != null)
 			{
-				palette.CurrentPalettes = palette.SetCurrentPalettesType(currentPalette.Kind);
+				palette.CurrentPalettes = palette.SetCurrentPalettesType(currentTerrain.ColorPal.Kind);
 
 				currentPalette = palette.CurrentPalettes.GetPaletteGroup(currentTerrain.ColorPal.Name); 
 
@@ -181,7 +181,7 @@ public string TerrainPlanet
 
 				if (currentTerrain != null)
 				{
-					palette.CurrentPalettes = palette.SetCurrentPalettesType(currentPalette.Kind);
+					palette.CurrentPalettes = palette.SetCurrentPalettesType(currentTerrain.ColorPal.Kind);
 
 					currentPalette = palette.CurrentPalettes.GetPaletteGroup(currentTerrain.ColorPal.Name); 
 
@@ -232,7 +232,7 @@ public string TerrainPaletteStyle
 
 				currentPalette = palette.CurrentPalettes.GetFirstGroup();
 
-				_terrainPalette = currentPalette._PaletteName;
+				_terrainPalette = currentPalette.PaletteName;
 			}
 		}
 

From 7e0d90a8687d9bd372655db8e6a12ac7ef2f0fea Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:12:48 -0400
Subject: [PATCH 22/29] License info

---
 SCANsat/SCAN_Palettes/SCANPaletteKind.cs | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/SCANsat/SCAN_Palettes/SCANPaletteKind.cs b/SCANsat/SCAN_Palettes/SCANPaletteKind.cs
index a08001bb4..e5365bb85 100644
--- a/SCANsat/SCAN_Palettes/SCANPaletteKind.cs
+++ b/SCANsat/SCAN_Palettes/SCANPaletteKind.cs
@@ -1,4 +1,17 @@
-using System;
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCANPaletteKind - Enum to define color palette types
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
 
 namespace SCANsat.SCAN_Palettes
 {

From 67968ed584e2922b2ca9b86cdba07bc3ce1de41b Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:13:49 -0400
Subject: [PATCH 23/29] Use name for config node identifier; add default
 palette when generating file; set palette kind

---
 SCANsat/SCAN_Palettes/SCANPaletteType.cs | 55 ++++++++++++++++++------
 1 file changed, 43 insertions(+), 12 deletions(-)

diff --git a/SCANsat/SCAN_Palettes/SCANPaletteType.cs b/SCANsat/SCAN_Palettes/SCANPaletteType.cs
index b2f64063a..1b2da2b0c 100644
--- a/SCANsat/SCAN_Palettes/SCANPaletteType.cs
+++ b/SCANsat/SCAN_Palettes/SCANPaletteType.cs
@@ -1,4 +1,17 @@
-using System;
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCANPaletteType - Class to hold info on related color palette types
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using UnityEngine;
@@ -9,7 +22,7 @@ namespace SCANsat.SCAN_Palettes
 	public class SCANPaletteType : SCAN_ConfigNodeStorage
 	{
 		[Persistent]
-		private string PaletteType;
+		private string name;
 		[Persistent]
 		private List PaletteGroups = new List();
 		
@@ -23,7 +36,7 @@ public SCANPaletteType() { }
 
 		public SCANPaletteType(string type)
 		{
-			PaletteType = type;
+			name = type;
 
 			try
 			{
@@ -34,7 +47,6 @@ public SCANPaletteType(string type)
 				_kind = SCANPaletteKind.Unknown;
 				SCANUtil.SCANlog("Error assigning SCANsat palette type - Type: {0}\n{1}", type, e);
 			}
-
 		}
 
 		public SCANPaletteKind Kind
@@ -104,6 +116,7 @@ public void SaveDefaultPalettes()
 					PaletteGroups.Add(new SCANPaletteGroup("arctic", _kind));
 					PaletteGroups.Add(new SCANPaletteGroup("mercury", _kind));
 					PaletteGroups.Add(new SCANPaletteGroup("venus", _kind));
+					PaletteGroups.Add(SCAN_Palette_Config.DefaultPalette);
 					break;
 				default:
 					break;
@@ -115,13 +128,21 @@ public void SaveDefaultPalettes()
 			OnDecodeFromConfigNode();
 		}
 
+		public void AddPaletteGroup(SCANPaletteGroup group)
+		{
+
+		}
+
 		public SCANPaletteGroup GetPaletteGroup(string name)
 		{
+			if (name == "Default" || name == "default")
+				return SCAN_Palette_Config.DefaultPalette;
+
 			for (int i = MasterPaletteGroupList.Count - 1; i >= 0; i--)
 			{
 				SCANPaletteGroup group = MasterPaletteGroupList.At(i);
 
-				if (group._PaletteName != name)
+				if (group.PaletteName != name)
 					continue;
 
 				return group;
@@ -136,7 +157,7 @@ public string[] GetGroupNames()
 
 			for (int i = 0; i < MasterPaletteGroupList.Count; i++)
 			{
-				names[i] = MasterPaletteGroupList.At(i)._PaletteName;
+				names[i] = MasterPaletteGroupList.At(i).PaletteName;
 			}
 
 			return names;
@@ -175,9 +196,11 @@ public Texture2D[] GenerateSwatches(int length)
 
 				for (int i = 0; i < MasterPaletteGroupList.Count; i++)
 				{
+					SCANPalette palette = MasterPaletteGroupList.At(i).GetPalette(length);
+
 					int k = 0;
 					int m = 120;
-					int paletteSize = length;
+					int paletteSize = palette.Count;
 
 					_swatchLength = length;
 
@@ -211,7 +234,7 @@ public Texture2D[] GenerateSwatches(int length)
 						if (j % sW == 0)
 							k++;
 
-						pix[j] = MasterPaletteGroupList.At(i).GetPalette(length).ColorsArray[k - 1];
+						pix[j] = palette.ColorsArray[k - 1];
 					}
 
 					t.SetPixels32(pix);
@@ -228,12 +251,12 @@ public override void OnDecodeFromConfigNode()
 		{
 			try
 			{
-				_kind = (SCANPaletteKind)Enum.Parse(typeof(SCANPaletteKind), PaletteType);
+				_kind = (SCANPaletteKind)Enum.Parse(typeof(SCANPaletteKind), name);
 			}
 			catch (Exception e)
 			{
 				_kind = SCANPaletteKind.Unknown;
-				SCANUtil.SCANlog("Error assigning SCANsat palette type - Type: {0}\n{1}", PaletteType, e);
+				SCANUtil.SCANlog("Error assigning SCANsat palette type - Type: {0}\n{1}", name, e);
 			}
 
 			try
@@ -245,10 +268,18 @@ public override void OnDecodeFromConfigNode()
 					if (p == null)
 						continue;
 
-					if (!MasterPaletteGroupList.Contains(p._PaletteName))
-						MasterPaletteGroupList.Add(p._PaletteName, p);
+					if (!MasterPaletteGroupList.Contains(p.PaletteName))
+						MasterPaletteGroupList.Add(p.PaletteName, p);
 
 					p.Kind = _kind;
+
+					p.setPaletteKind(_kind);
+				}
+
+				if (_kind == SCANPaletteKind.Fixed)
+				{
+					if (!MasterPaletteGroupList.Contains("Default"))
+						MasterPaletteGroupList.Add("Default", SCAN_Palette_Config.DefaultPalette);
 				}
 			}
 			catch (Exception e)

From f2e1c6013df859c6b826acfb3b7aabff5511cd71 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:14:50 -0400
Subject: [PATCH 24/29] Use name for config node identifier; set palette kind

---
 SCANsat/SCAN_Palettes/SCANPaletteGroup.cs | 72 ++++++++++++++++++-----
 1 file changed, 57 insertions(+), 15 deletions(-)

diff --git a/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs b/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs
index 71092a0f8..39462ccc2 100644
--- a/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs
+++ b/SCANsat/SCAN_Palettes/SCANPaletteGroup.cs
@@ -1,4 +1,16 @@
-
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCANPaletteGroup - Class to hold info on a group of color palettes
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -10,7 +22,7 @@ namespace SCANsat.SCAN_Palettes
 	public class SCANPaletteGroup : SCAN_ConfigNodeStorage
 	{
 		[Persistent]
-		private string PaletteName;
+		private string name;
 		[Persistent]
 		private List Palettes = new List();
 
@@ -20,21 +32,32 @@ public class SCANPaletteGroup : SCAN_ConfigNodeStorage
 
 		public SCANPaletteGroup() { }
 
-		public SCANPaletteGroup(string name, SCANPaletteKind kind)
+		public SCANPaletteGroup(string _name, SCANPaletteKind kind)
 		{
-			PaletteName = name;
+			name = _name;
 			_kind = kind;
 		}
 
+		public SCANPaletteGroup(string _name, SCANPaletteKind kind, SCANPalette palette)
+		{
+			name = _name;
+			_kind = kind;
+
+			Palettes.Add(palette);
+
+			if (!MasterPaletteList.Contains(palette.Count))
+				MasterPaletteList.Add(palette.Count, palette);
+		}
+
 		public SCANPaletteKind Kind
 		{
 			get { return _kind; }
 			set { _kind = value; }
 		}
 
-		public string _PaletteName
+		public string PaletteName
 		{
-			get { return PaletteName; }
+			get { return name; }
 		}
 
 		public SCANPalette GetPalette(int length)
@@ -46,7 +69,14 @@ public SCANPalette GetPalette(int length)
 				return MasterPaletteList[length];
 
 			if (MasterPaletteList.Count > 0)
-				return MasterPaletteList.At(MasterPaletteList.Count - 1);
+			{
+				int max = MasterPaletteList.Values.Max(p => p.Count);
+
+				if (MasterPaletteList.Contains(max))
+					return MasterPaletteList[max];
+
+				return MasterPaletteList.At(0);
+			}
 
 			return null;
 		}
@@ -62,11 +92,14 @@ public void SaveDefaultPalettes()
 				switch (_kind)
 				{
 					case SCANPaletteKind.Fixed:
-						var fixedPalette = typeof(FixedColorPalettes);
-						var fixedPaletteMethod = fixedPalette.GetMethod(PaletteName);
-						var fixedColorPalette = fixedPaletteMethod.Invoke(null, null);
-						Palettes.Add((SCANPalette)fixedColorPalette);
-						OnDecodeFromConfigNode();
+						if (name != "Default")
+						{
+							var fixedPalette = typeof(FixedColorPalettes);
+							var fixedPaletteMethod = fixedPalette.GetMethod(name);
+							var fixedColorPalette = fixedPaletteMethod.Invoke(null, null);
+							Palettes.Add((SCANPalette)fixedColorPalette);
+							OnDecodeFromConfigNode();
+						}
 						return;
 					case SCANPaletteKind.Diverging:
 						count = 11;
@@ -82,7 +115,7 @@ public void SaveDefaultPalettes()
 				}
 
 				var brewerPalette = typeof(BrewerPalettes);
-				var brewerPaletteMethod = brewerPalette.GetMethod(PaletteName);
+				var brewerPaletteMethod = brewerPalette.GetMethod(name);
 
 				for (int i = 3; i <= count; i++)
 				{
@@ -98,6 +131,16 @@ public void SaveDefaultPalettes()
 			OnDecodeFromConfigNode();
 		}
 
+		public void setPaletteKind(SCANPaletteKind kind)
+		{
+			for (int i = MasterPaletteList.Count - 1; i >= 0; i--)
+			{
+				SCANPalette p = MasterPaletteList.At(i);
+
+				p.Kind = kind;
+			}
+		}
+
 		public override void OnDecodeFromConfigNode()
 		{
 			try
@@ -112,8 +155,7 @@ public override void OnDecodeFromConfigNode()
 					if (!MasterPaletteList.Contains(p.Count))
 						MasterPaletteList.Add(p.Count, p);
 
-					p.Name = PaletteName;
-					p.Kind = _kind;
+					p.Name = name;
 				}
 			}
 			catch (Exception e)

From d4c619a80432334630160e337a92007fef5268d1 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:15:05 -0400
Subject: [PATCH 25/29] License info; default palette generation

---
 SCANsat/SCAN_Palette_Config.cs | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/SCANsat/SCAN_Palette_Config.cs b/SCANsat/SCAN_Palette_Config.cs
index b81cffa1d..250a6fd59 100644
--- a/SCANsat/SCAN_Palette_Config.cs
+++ b/SCANsat/SCAN_Palette_Config.cs
@@ -1,4 +1,17 @@
-using System;
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCAN_Palette_Config - Config object to load and store info on color palettes
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using SCANsat.SCAN_Palettes;
@@ -15,9 +28,9 @@ public class SCAN_Palette_Config : SCAN_ConfigNodeStorage
 
 		private DictionaryValueList MasterPaletteTypeList = new DictionaryValueList();
 
-		private SCANPalette _defaultPalette;
+		private static SCANPaletteGroup _defaultPalette;
 
-		public SCANPalette DefaultPalette
+		public static SCANPaletteGroup DefaultPalette
 		{
 			get
 			{
@@ -33,6 +46,8 @@ public SCAN_Palette_Config(string filepath, string node)
 			FilePath = filepath;
 			TopNodeName = filepath + "/" + node;
 
+			_defaultPalette = GenerateDefaultPalette();
+
 			if (!Load())
 			{
 				SaveDefaultPalettes();
@@ -41,20 +56,22 @@ public SCAN_Palette_Config(string filepath, string node)
 			}
 			else
 				SCANUtil.SCANlog("Palette File Loaded");
-
-			_defaultPalette = GenerateDefaultPalette();
 		}
 
-		private SCANPalette GenerateDefaultPalette()
+		private static SCANPaletteGroup GenerateDefaultPalette()
 		{
 			Color32[] c = new Color32[7] { (Color32)palette.xkcd_DarkPurple, (Color32)palette.xkcd_Cerulean, (Color32)palette.xkcd_ArmyGreen, (Color32)palette.xkcd_Yellow, (Color32)palette.xkcd_Red, (Color32)palette.xkcd_Magenta, (Color32)palette.xkcd_White };
 
-			return new SCANPalette(c, "Default", SCANPaletteKind.Fixed, c.Length);
+			SCANPalette def = new SCANPalette(c, "Default", SCANPaletteKind.Fixed, c.Length);
+
+			SCANPaletteGroup group = new SCANPaletteGroup("Default", SCANPaletteKind.Fixed, def);
+
+			return group;
 		}
 
 		private void SaveDefaultPalettes()
 		{
-			SCANUtil.SCANlog("Generating default palettes");
+			SCANUtil.SCANlog("No SCANsat color palette file located\nGenerating default palettes...");
 
 			PaletteTypes = new List();
 

From 5a3be74792d6a1d2aada22dc7a6f9a7597b8a093 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:15:11 -0400
Subject: [PATCH 26/29] License info

---
 SCANsat/SCAN_Palettes/SCANPalette.cs | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/SCANsat/SCAN_Palettes/SCANPalette.cs b/SCANsat/SCAN_Palettes/SCANPalette.cs
index 0e53ad6bc..1e08bf3e5 100644
--- a/SCANsat/SCAN_Palettes/SCANPalette.cs
+++ b/SCANsat/SCAN_Palettes/SCANPalette.cs
@@ -1,4 +1,17 @@
-using System;
+#region license
+/* 
+ * [Scientific Committee on Advanced Navigation]
+ * 			S.C.A.N. Satellite
+ *
+ * SCANPalette - Class to hold color palette info
+ * 
+ * Copyright (c)2014 David Grandy ;
+ * Copyright (c)2014 technogeeky ;
+ * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details.
+ */
+#endregion
+
+using System;
 using UnityEngine;
 using SCANsat.SCAN_Platform;
 

From 5c63d0dda1e0b5e4f88b2a73478dd7eabbf2b053 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:15:39 -0400
Subject: [PATCH 27/29] Default palette methods

---
 SCANsat/SCAN_Data/SCANdata.cs |  2 +-
 SCANsat/SCANcontroller.cs     |  4 ++--
 SCANsat/SCANutil.cs           | 43 ++++-------------------------------
 3 files changed, 8 insertions(+), 41 deletions(-)

diff --git a/SCANsat/SCAN_Data/SCANdata.cs b/SCANsat/SCAN_Data/SCANdata.cs
index 6ed7de142..7555fee2e 100644
--- a/SCANsat/SCAN_Data/SCANdata.cs
+++ b/SCANsat/SCAN_Data/SCANdata.cs
@@ -74,7 +74,7 @@ internal SCANdata(CelestialBody b)
 					newMax = SCANconfigLoader.SCANNode.DefaultMaxHeightRange;
 				}
 
-				terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANconfigLoader.SCANPalettes.DefaultPalette, 7, false, false, body);
+				terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCAN_Palette_Config.DefaultPalette.GetPalette(0), 7, false, false, body);
 				SCANcontroller.addToTerrainConfigData(body.bodyName, terrainConfig);
 			}
 		}
diff --git a/SCANsat/SCANcontroller.cs b/SCANsat/SCANcontroller.cs
index 76cad857f..048e3bc73 100644
--- a/SCANsat/SCANcontroller.cs
+++ b/SCANsat/SCANcontroller.cs
@@ -266,7 +266,7 @@ public static void checkLoadedTerrainNodes()
 					}
 
 					SCANUtil.SCANlog("Generating new SCANsat Terrain Config for [{0}] - Max Height: [{1:F0}m]", b.bodyName, newMax);
-
+					
 					addToTerrainConfigData(b.bodyName, new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.PaletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, b));
 				}
 			}
@@ -641,7 +641,7 @@ public override void OnLoad(ConfigNode node)
 
 							SCANPalette dataPalette = SCANUtil.PaletteLoader(paletteName, pSize);
 
-							if (dataPalette.Hash == SCANconfigLoader.SCANPalettes.DefaultPalette.Hash)
+							if (dataPalette.Hash == SCAN_Palette_Config.DefaultPalette.GetPalette(0).Hash)
 							{
 								paletteName = "Default";
 								pSize = 7;
diff --git a/SCANsat/SCANutil.cs b/SCANsat/SCANutil.cs
index 2f0f374bb..60d075bfc 100644
--- a/SCANsat/SCANutil.cs
+++ b/SCANsat/SCANutil.cs
@@ -569,56 +569,23 @@ internal static string displayNameFromResource(string resource)
 		internal static SCANPalette PaletteLoader(string name, int size)
 		{
 			if (name == "Default" || string.IsNullOrEmpty(name))
-				return SCANconfigLoader.SCANPalettes.DefaultPalette;
+				return SCAN_Palette_Config.DefaultPalette.GetPalette(0);
 			else
 			{
 				SCANPaletteGroup group = SCANconfigLoader.SCANPalettes.GetPaletteGroup(name);
 
 				if (group == null)
-					return SCANconfigLoader.SCANPalettes.DefaultPalette;
-
+					return SCAN_Palette_Config.DefaultPalette.GetPalette(0);
+				
 				SCANPalette pal = group.GetPalette(size);
 
 				if (pal == null)
-					return SCANconfigLoader.SCANPalettes.DefaultPalette;
-
+					return SCAN_Palette_Config.DefaultPalette.GetPalette(0);
+				
 				return pal;
 			}
 		}
 
-		//internal static Palette paletteLoader(string name, int size)
-		//{
-		//	if (name == "Default" || string.IsNullOrEmpty(name))
-		//		return PaletteLoader.defaultPalette;
-		//	else
-		//	{
-		//		try
-		//		{
-		//			if (name == "blackForest" || name == "departure" || name == "northRhine" || name == "mars" || name == "wiki2" || name == "plumbago" || name == "cw1_013" || name == "arctic" || name == "mercury" || name == "venus")
-		//			{
-		//				//Load the fixed size color palette by name through reflection
-		//				var fixedPallete = typeof(FixedColorPalettes);
-		//				var fPaletteMethod = fixedPallete.GetMethod(name);
-		//				var fColorP = fPaletteMethod.Invoke(null, null);
-		//				return (Palette)fColorP;
-		//			}
-		//			else
-		//			{
-		//				//Load the ColorBrewer method by name through reflection
-		//				var brewer = typeof(BrewerPalettes);
-		//				var bPaletteMethod = brewer.GetMethod(name);
-		//				var bColorP = bPaletteMethod.Invoke(null, new object[] { size });
-		//				return (Palette)bColorP;
-		//			}
-		//		}
-		//		catch (Exception e)
-		//		{
-		//			SCANUtil.SCANlog("Error Loading Color Palette; Revert To Default: {0}", e);
-		//			return PaletteLoader.defaultPalette;
-		//		}
-		//	}
-		//}
-
 		internal static CelestialBody getTargetBody(MapObject target)
 		{
 			switch (target.type)

From 50360fbd48a9688b89ad84e8b326b8a90ac8dab4 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:18:32 -0400
Subject: [PATCH 28/29] Fix narrow band scanner requirement

---
 SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs b/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs
index ab62e2b41..1b218fcd7 100644
--- a/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs
+++ b/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs
@@ -110,13 +110,15 @@ where nodes.GetValue("name") == "ModuleSCANresourceScanner"
 								if (!int.TryParse(type, out sType))
 									continue;
 
-								if ((SCANtype)sType != resource.SType)
+								if (((SCANtype)sType & resource.SType) == SCANtype.Nothing)
 									continue;
 
 								if (moduleNode.HasValue("max_alt") && !vessel.Landed)
 								{
 									string alt = moduleNode.GetValue("max_alt");
+
 									float f = 0;
+
 									if (!float.TryParse(alt, out f))
 										continue;
 
@@ -138,7 +140,6 @@ where nodes.GetValue("name") == "ModuleSCANresourceScanner"
 					}
 					else
 					{
-
 						if (vessel.altitude > 1000000)
 							continue;
 
@@ -175,7 +176,9 @@ where nodes.GetValue("name") == "ModuleKerbNetAccess"
 
 								foreach (string mode in displayMode.GetValues("Mode"))
 								{
-									if (mode != "Resources")
+									string[] subMode = mode.Split(',');
+
+									if (subMode[0].Trim() != "Resources")
 										continue;
 
 									scanner = true;

From bbc3ae7d0e12dd078318f051c5bf65af675550d8 Mon Sep 17 00:00:00 2001
From: DMagic 
Date: Wed, 11 Oct 2017 12:33:19 -0400
Subject: [PATCH 29/29] Fixes for BTDT when anomaly has not been scanned from
 orbit; fix for unsupported Render Texture formats

---
 .../SCAN_UI/UI_Framework/SCANremoteView.cs    | 20 ++++++++++++----
 SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs     | 23 +++++++++++--------
 2 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs b/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs
index ae9fff31f..f6b259298 100644
--- a/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs
+++ b/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs
@@ -94,7 +94,12 @@ private void updateCamera()
 
 			if (rt == null || rt.width != width || rt.height != height)
 			{
-				rt = new RenderTexture(width, height, 32, RenderTextureFormat.RGB565);
+				RenderTextureFormat format = RenderTextureFormat.RGB565;
+
+				if (!SystemInfo.SupportsRenderTextureFormat(format))
+					format = RenderTextureFormat.Default;
+
+				rt = new RenderTexture(width, height, 32, format);
 				rt.Create();
 			}
 
@@ -149,13 +154,15 @@ public string getInfoString()
 
 			if (cons.Count > 0)
 				info = string.Format("Identified {0} structure{1}", cons.Count, cons.Count > 1 ? "s" : "");
+			else
+				return "";
 
 			info = "> " + info;
 			
 			return info;
 		}
 
-		public string getAnomalyDataString(bool mouse)
+		public string getAnomalyDataString(bool mouse, bool distance)
 		{
 			string sname = lookat.name;
 
@@ -180,9 +187,14 @@ public string getAnomalyDataString(bool mouse)
 				sname = lookdetail.objectName;
 			}
 
-			string dist = SCANuiUtil.distanceString((FlightGlobals.ActiveVessel.transform.position - lookvec).magnitude, 2000);
+			if (distance)
+			{
+				string dist = SCANuiUtil.distanceString((FlightGlobals.ActiveVessel.transform.position - lookvec).magnitude, 2000);
 
-			return string.Format("{0}\n{1}", sname, dist);
+				return string.Format("{0}\n{1}", sname, dist);
+			}
+			else
+				return string.Format("\n{0}", sname);
 		}
 
 	}
diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs b/SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs
index b8bec5add..537027604 100644
--- a/SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs
+++ b/SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs
@@ -537,14 +537,14 @@ private void resourceLabel(SCANresourceGlobal r, bool high, bool onboard)
 
 		private void anomalyInfo()
 		{
-			if ((sensors & SCANtype.Anomaly) != SCANtype.Nothing)
-			{
+			//if ((sensors & SCANtype.Anomaly) != SCANtype.Nothing)
+			//{
 				nearest = null;
 				double nearest_dist = -1;
 
 				foreach (SCANanomaly a in data.Anomalies)
 				{
-					if (!a.Known)
+					if (!a.Known && !a.Detail)
 						continue;
 
 					double d = (a.Mod.transform.position - v.transform.position).magnitude;
@@ -563,14 +563,19 @@ private void anomalyInfo()
 				{
 					infoString.AppendLine();
 
-					if (nearest.Detail)
+					if (nearest.Detail && nearest.Known)
 						infoString.Append(string.Format("{0}: {1}", nearest.Name, SCANuiUtil.distanceString(nearest_dist, 2000)));
 					else
-						infoString.Append(string.Format("Unknown Anomaly: {0}", SCANuiUtil.distanceString(nearest_dist, 2000)));
+					{
+						if (nearest.Detail)
+							infoString.Append(nearest.Name);
+						else if (nearest.Known)
+							infoString.Append(string.Format("Unknown Anomaly: {0}", SCANuiUtil.distanceString(nearest_dist, 2000)));
+					}					
 				}
-			}
-			else
-				nearest = null;
+			//}
+			//else
+				//nearest = null;
 		}
 
 		private void BTDTInfo()
@@ -605,7 +610,7 @@ private void BTDTInfo()
 			uiElement.UpdateAnomaly(anomalyTex);
 
 			string info = _anomalyView.getInfoString();
-			string aData = _anomalyView.getAnomalyDataString(_mouseInAnomaly);
+			string aData = _anomalyView.getAnomalyDataString(_mouseInAnomaly, nearest.Known);
 
 			uiElement.UpdateAnomalyText(info);
 			uiElement.UpdateAnomalyName(aData);