spacegear star colors patch

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
drjoe

spacegear star colors patch

Post #1by drjoe » 02.01.2003, 02:17

Here a patch that adjusts the star colors to be the ones in the spacegear table that
was just mentioned. It compiles in the table, although it should be an easy matter
for it to soft-code in the tables.

Code: Select all

--- render.cpp   23 Dec 2002 06:58:58 -0000   1.91
+++ render.cpp   2 Jan 2003 01:22:37 -0000
@@ -3103,41 +3107,15 @@
 
         Color sunColor(1.0f, 1.0f, 1.0f);
         {
-            // If the star is sufficiently cool, change the light color
-            // from white.  Though our sun appears yellow, we still make
-            // it and all hotter stars emit white light, as this is the
-            // 'natural' light to which our eyes are accustomed.  We also
-            // assign a slight bluish tint to light from O and B type stars,
-            // though these will almost never have planets for their light
-            // to shine upon.
             PlanetarySystem* system = body.getSystem();
             if (system != NULL)
             {
+         // Now that we are using realistic star colors
+         // we do not need to special code the planetary stellar
+         // colors
                 const Star* sun = system->getStar();
-                switch (sun->getStellarClass().getSpectralClass())
-                {
-                case StellarClass::Spectral_O:
-                    sunColor = Color(0.8f, 0.8f, 1.0f);
-                    break;
-                case StellarClass::Spectral_B:
-                    sunColor = Color(0.9f, 0.9f, 1.0f);
-                    break;
-                case StellarClass::Spectral_K:
-                    sunColor = Color(1.0f, 0.9f, 0.8f);
-                    break;
-                case StellarClass::Spectral_M:
-                    sunColor = Color(1.0f, 0.7f, 0.7f);
-                    break;
-                case StellarClass::Spectral_R:
-                case StellarClass::Spectral_S:
-                case StellarClass::Spectral_N:
-                    sunColor = Color(1.0f, 0.4f, 0.4f);
-                    break;
-                default:
-                    // Default case to keep gcc from compaining about unhandled
-                    // switch values.
-                    break;
-                }
+      sunColor =
+        sun->getStellarClass().getApparentColor();
             }
         }
 
Index: stellarclass.cpp
===================================================================
RCS file: /cvsroot/celestia/celestia/src/celengine/stellarclass.cpp,v
retrieving revision 1.6
diff -u -r1.6 stellarclass.cpp
--- stellarclass.cpp   13 Dec 2002 18:43:48 -0000   1.6
+++ stellarclass.cpp   2 Jan 2003 01:23:01 -0000
@@ -10,45 +10,1159 @@
 #include <cstring>
 #include <cstdio>
 #include <cassert>
+#include <map>
 #include "celestia.h"
 #include "stellarclass.h"
 
 using namespace std;
 
+// This color table comes from http://www.spacegear.org/
+// Someone should recode this so that it is loaded via the file
+// directly - 20021228
 
-Color StellarClass::getApparentColor() const
+// TODO. This class doesn't have proper classes for white dwarves
+
+struct lt
 {
-    return getApparentColor(getSpectralClass());
-}
+  bool operator()(int s1, int s2) const
+  {
+    return s1 < s2;
+  }
+};
+                                                                               
 
 
-Color StellarClass::getApparentColor(StellarClass::SpectralClass sc) const
-{
-    switch (sc)
-    {
-    case Spectral_O:
-        return Color(0.7f, 0.8f, 1.0f);
-    case Spectral_B:
-        return Color(0.8f, 0.9f, 1.0f);
-    case Spectral_A:
-        return Color(1.0f, 1.0f, 1.0f);
-    case Spectral_F:
-        return Color(1.0f, 1.0f, 0.88f);
-    case Spectral_G:
-        return Color(1.0f, 1.0f, 0.75f);
-    case StellarClass::Spectral_K:
-        return Color(1.0f, 0.9f, 0.7f);
-    case StellarClass::Spectral_M:
-        return Color(1.0f, 0.7f, 0.7f);
-    case StellarClass::Spectral_R:
-    case StellarClass::Spectral_S:
-    case StellarClass::Spectral_N:
-        return Color(1.0f, 0.4f, 0.4f);
-    default:
-        // TODO: Figure out reasonable colors for Wolf-Rayet stars,
-        // white dwarfs, and other oddities
-        return Color(1.0f, 1.0f, 1.0f);
+struct ColorTable {
+  char *spectral_class;
+  float abs_mag;
+  unsigned int  red, green, blue;
+};
+
+static int color_table_init = 0;
+static map <int, Color, lt> mapped_color_table;
+
+static ColorTable color_table [] = {
+  {"O0 Ia0",-9.5,144,166,255},
+  {"O1 Ia0",-9.4,146,168,255},
+  {"O2 Ia0",-9.3,148,170,255},
+  {"O3 Ia0",-9.2,151,172,255},
+  {"O4 Ia0",-9.1,153,174,255},
+  {"O5 Ia0",-9.0,155,176,255},
+  {"O6 Ia0",-8.9,157,178,255},
+  {"O7 Ia0",-8.8,160,181,255},
+  {"O8 Ia0",-8.7,162,183,255},
+  {"O9 Ia0",-8.6,164,185,255},
+  {"B0 Ia0",-8.5,161,189,255},
+  {"B1 Ia0",-8.5,168,193,255},
+  {"B2 Ia0",-8.4,177,196,255},
+  {"B3 Ia0",-8.4,175,194,255},
+  {"B4 Ia0",-8.4,187,203,255},
+  {"B5 Ia0",-8.3,179,202,255},
+  {"B6 Ia0",-8.3,191,207,255},
+  {"B7 Ia0",-8.2,195,209,255},
+  {"B8 Ia0",-8.1,182,206,255},
+  {"B9 Ia0",-8.1,204,216,255},
+  {"A0 Ia0",-8.0,187,206,255},
+  {"A1 Ia0",-8.1,214,223,255},
+  {"A2 Ia0",-8.2,199,214,255},
+  {"A3 Ia0",-8.3,207,219,255},
+  {"A4 Ia0",-8.4,215,224,255},
+  {"A5 Ia0",-8.5,223,229,255},
+  {"A6 Ia0",-8.5,219,226,255},
+  {"A7 Ia0",-8.6,215,223,255},
+  {"A8 Ia0",-8.6,210,221,255},
+  {"A9 Ia0",-8.7,206,218,255},
+  {"F0 Ia0",-8.7,202,215,255},
+  {"F1 Ia0",-8.8,223,229,255},
+  {"F2 Ia0",-8.8,244,243,255},
+  {"F3 Ia0",-8.9,236,237,255},
+  {"F4 Ia0",-9.0,227,231,255},
+  {"F5 Ia0",-9.1,219,225,255},
+  {"F6 Ia0",-9.1,255,234,252},
+  {"F7 Ia0",-9.2,255,243,250},
+  {"F8 Ia0",-9.2,255,252,247},
+  {"F9 Ia0",-9.3,255,246,233},
+  {"G0 Ia0",-9.3,255,239,219},
+  {"G1 Ia0",-9.3,255,238,212},
+  {"G2 Ia0",-9.3,255,236,205},
+  {"G3 Ia0",-9.4,255,231,203},
+  {"G4 Ia0",-9.4,255,231,193},
+  {"G5 Ia0",-9.5,255,230,183},
+  {"G6 Ia0",-9.5,255,227,178},
+  {"G7 Ia0",-9.5,255,223,172},
+  {"G8 Ia0",-9.4,255,220,167},
+  {"G9 Ia0",-9.4,255,221,174},
+  {"K0 Ia0",-9.4,255,221,181},
+  {"K1 Ia0",-9.3,255,220,177},
+  {"K2 Ia0",-9.3,255,211,135},
+  {"K3 Ia0",-9.3,255,204,128},
+  {"K4 Ia0",-9.3,255,201,118},
+  {"K5 Ia0",-9.3,255,209,154},
+  {"K6 Ia0",-9.3,255,208,152},
+  {"K7 Ia0",-9.3,255,207,150},
+  {"K8 Ia0",-9.3,255,206,147},
+  {"K9 Ia0",-9.3,255,205,145},
+  {"M0 Ia0",-9.3,255,204,143},
+  {"M1 Ia0",-9.3,255,202,138},
+  {"M2 Ia0",-9.3,255,193,104},
+  {"M3 Ia0",-9.2,255,192,118},
+  {"M4 Ia0",-9.2,255,185,104},
+  {"M5 Ia0",-9.2,255,178,78},
+  {"M6 Ia0",-9.1,255,171,52},
+  {"M7 Ia0",-9.1,255,164,26},
+  {"M8 Ia0",-9.1,255,157,0},
+  {"M9 Ia0",-9.0,255,157,0},
+  {"R0 Ia0",-9.4,255,231,193},
+  {"R1 Ia0",-9.4,255,228,187},
+  {"R2 Ia0",-9.4,255,225,182},
+  {"R3 Ia0",-9.3,255,222,176},
+  {"R4 Ia0",-9.3,255,219,171},
+  {"R5 Ia0",-9.3,255,216,165},
+  {"R6 Ia0",-9.3,255,213,160},
+  {"R7 Ia0",-9.3,255,210,154},
+  {"R8 Ia0",-9.3,255,207,149},
+  {"R9 Ia0",-9.3,255,204,143},
+  {"S0 Ia0",-9.3,255,204,143},
+  {"S1 Ia0",-9.3,255,202,138},
+  {"S2 Ia0",-9.3,255,193,104},
+  {"S3 Ia0",-9.2,255,192,118},
+  {"S4 Ia0",-9.2,255,185,104},
+  {"S5 Ia0",-9.2,255,178,78},
+  {"S6 Ia0",-9.1,255,171,52},
+  {"S7 Ia0",-9.1,255,164,26},
+  {"S8 Ia0",-9.1,255,157,0},
+  {"S9 Ia0",-9.0,255,157,0},
+  {"N0 Ia0",-9.3,255,204,143},
+  {"N1 Ia0",-9.3,255,202,138},
+  {"N2 Ia0",-9.3,255,193,104},
+  {"N3 Ia0",-9.2,255,192,118},
+  {"N4 Ia0",-9.2,255,185,104},
+  {"N5 Ia0",-9.2,255,178,78},
+  {"N6 Ia0",-9.1,255,171,52},
+  {"N7 Ia0",-9.1,255,164,26},
+  {"N8 Ia0",-9.1,255,157,0},
+  {"N9 Ia0",-9.0,255,157,0},
+  {"C0 Ia0",-9.4,255,231,193},
+  {"C1 Ia0",-9.5,255,222,172},
+  {"C2 Ia0",-9.4,255,214,150},
+  {"C3 Ia0",-9.3,255,206,129},
+  {"C4 Ia0",-9.3,255,198,107},
+  {"C5 Ia0",-9.3,255,190,86},
+  {"C6 Ia0",-9.3,255,182,64},
+  {"C7 Ia0",-9.2,255,173,43},
+  {"C8 Ia0",-9.1,255,165,21},
+  {"C9 Ia0",-9.0,255,157,0},
+  {"WC0 Ia0",-9.5,144,166,255},
+  {"WC1 Ia0",-9.4,146,168,255},
+  {"WC2 Ia0",-9.3,148,170,255},
+  {"WC3 Ia0",-9.2,151,172,255},
+  {"WC4 Ia0",-9.1,153,174,255},
+  {"WC5 Ia0",-9.0,155,176,255},
+  {"WC6 Ia0",-8.9,157,178,255},
+  {"WC7 Ia0",-8.8,160,181,255},
+  {"WC8 Ia0",-8.7,162,183,255},
+  {"WC9 Ia0",-8.6,164,185,255},
+  {"WN0 Ia0",-9.5,144,166,255},
+  {"WN1 Ia0",-9.4,146,168,255},
+  {"WN2 Ia0",-9.3,148,170,255},
+  {"WN3 Ia0",-9.2,151,172,255},
+  {"WN4 Ia0",-9.1,153,174,255},
+  {"WN5 Ia0",-9.0,155,176,255},
+  {"WN6 Ia0",-8.9,157,178,255},
+  {"WN7 Ia0",-8.8,160,181,255},
+  {"WN8 Ia0",-8.7,162,183,255},
+  {"WN9 Ia0",-8.6,164,185,255},
+  {"O0 Ia",-6.7,144,166,255},
+  {"O1 Ia",-6.7,146,168,255},
+  {"O2 Ia",-6.8,148,170,255},
+  {"O3 Ia",-6.8,151,172,255},
+  {"O4 Ia",-6.9,153,174,255},
+  {"O5 Ia",-6.9,155,176,255},
+  {"O6 Ia",-7.0,157,178,255},
+  {"O7 Ia",-7.0,160,181,255},
+  {"O8 Ia",-7.0,162,183,255},
+  {"O9 Ia",-7.0,164,185,255},
+  {"B0 Ia",-7.0,161,189,255},
+  {"B1 Ia",-7.0,168,193,255},
+  {"B2 Ia",-7.0,177,196,255},
+  {"B3 Ia",-7.1,175,194,255},
+  {"B4 Ia",-7.0,187,203,255},
+  {"B5 Ia",-7.0,179,202,255},
+  {"B6 Ia",-7.0,191,207,255},
+  {"B7 Ia",-7.1,195,209,255},
+  {"B8 Ia",-7.2,182,206,255},
+  {"B9 Ia",-7.3,204,216,255},
+  {"A0 Ia",-7.4,187,206,255},
+  {"A1 Ia",-7.5,214,223,255},
+  {"A2 Ia",-7.6,199,214,255},
+  {"A3 Ia",-7.7,207,219,255},
+  {"A4 Ia",-7.8,215,224,255},
+  {"A5 Ia",-8.0,223,229,255},
+  {"A6 Ia",-8.2,219,226,255},
+  {"A7 Ia",-8.4,215,223,255},
+  {"A8 Ia",-8.5,210,221,255},
+  {"A9 Ia",-8.5,206,218,255},
+  {"F0 Ia",-8.5,202,215,255},
+  {"F1 Ia",-8.5,223,229,255},
+  {"F2 Ia",-8.4,244,243,255},
+  {"F3 Ia",-8.4,236,237,255},
+  {"F4 Ia",-8.3,227,231,255},
+  {"F5 Ia",-8.2,219,225,255},
+  {"F6 Ia",-8.1,255,234,252},
+  {"F7 Ia",-8.0,255,243,250},
+  {"F8 Ia",-7.9,255,252,247},
+  {"F9 Ia",-7.9,255,246,233},
+  {"G0 Ia",-7.8,255,239,219},
+  {"G1 Ia",-7.8,255,238,212},
+  {"G2 Ia",-7.7,255,236,205},
+  {"G3 Ia",-7.7,255,231,203},
+  {"G4 Ia",-7.7,255,231,193},
+  {"G5 Ia",-7.6,255,230,183},
+  {"G6 Ia",-7.6,255,227,178},
+  {"G7 Ia",-7.6,255,223,172},
+  {"G8 Ia",-7.5,255,220,167},
+  {"G9 Ia",-7.5,255,221,174},
+  {"K0 Ia",-7.5,255,221,181},
+  {"K1 Ia",-7.4,255,220,177},
+  {"K2 Ia",-7.4,255,211,135},
+  {"K3 Ia",-7.4,255,204,128},
+  {"K4 Ia",-7.3,255,201,118},
+  {"K5 Ia",-7.3,255,209,154},
+  {"K6 Ia",-7.3,255,208,152},
+  {"K7 Ia",-7.2,255,207,150},
+  {"K8 Ia",-7.2,255,206,147},
+  {"K9 Ia",-7.2,255,205,145},
+  {"M0 Ia",-7.2,255,204,143},
+  {"M1 Ia",-7.1,255,202,138},
+  {"M2 Ia",-7.1,255,193,104},
+  {"M3 Ia",-7.1,255,192,118},
+  {"M4 Ia",-7.0,255,185,104},
+  {"M5 Ia",-7.0,255,178,78},
+  {"M6 Ia",-7.0,255,171,52},
+  {"M7 Ia",-6.9,255,164,26},
+  {"M8 Ia",-6.9,255,157,0},
+  {"M9 Ia",-6.9,255,157,0},
+  {"R0 Ia",-7.7,255,231,193},
+  {"R1 Ia",-7.6,255,228,187},
+  {"R2 Ia",-7.6,255,225,182},
+  {"R3 Ia",-7.5,255,222,176},
+  {"R4 Ia",-7.5,255,219,171},
+  {"R5 Ia",-7.4,255,216,165},
+  {"R6 Ia",-7.4,255,213,160},
+  {"R7 Ia",-7.3,255,210,154},
+  {"R8 Ia",-7.3,255,207,149},
+  {"R9 Ia",-7.2,255,204,143},
+  {"S0 Ia",-7.2,255,204,143},
+  {"S1 Ia",-7.1,255,202,138},
+  {"S2 Ia",-7.1,255,193,104},
+  {"S3 Ia",-7.1,255,192,118},
+  {"S4 Ia",-7.0,255,185,104},
+  {"S5 Ia",-7.0,255,178,78},
+  {"S6 Ia",-7.0,255,171,52},
+  {"S7 Ia",-6.9,255,164,26},
+  {"S8 Ia",-6.9,255,157,0},
+  {"S9 Ia",-6.9,255,157,0},
+  {"N0 Ia",-7.2,255,204,143},
+  {"N1 Ia",-7.1,255,202,138},
+  {"N2 Ia",-7.1,255,193,104},
+  {"N3 Ia",-7.1,255,192,118},
+  {"N4 Ia",-7.0,255,185,104},
+  {"N5 Ia",-7.0,255,178,78},
+  {"N6 Ia",-7.0,255,171,52},
+  {"N7 Ia",-6.9,255,164,26},
+  {"N8 Ia",-6.9,255,157,0},
+  {"N9 Ia",-6.9,255,157,0},
+  {"C0 Ia",-7.7,255,231,193},
+  {"C1 Ia",-7.6,255,222,172},
+  {"C2 Ia",-7.5,255,214,150},
+  {"C3 Ia",-7.4,255,206,129},
+  {"C4 Ia",-7.3,255,198,107},
+  {"C5 Ia",-7.3,255,190,86},
+  {"C6 Ia",-7.2,255,182,64},
+  {"C7 Ia",-7.1,255,173,43},
+  {"C8 Ia",-7.0,255,165,21},
+  {"C9 Ia",-6.9,255,157,0},
+  {"WC0 Ia",-6.7,144,166,255},
+  {"WC1 Ia",-6.7,146,168,255},
+  {"WC2 Ia",-6.8,148,170,255},
+  {"WC3 Ia",-6.8,151,172,255},
+  {"WC4 Ia",-6.9,153,174,255},
+  {"WC5 Ia",-6.9,155,176,255},
+  {"WC6 Ia",-7.0,157,178,255},
+  {"WC7 Ia",-7.0,160,181,255},
+  {"WC8 Ia",-7.0,162,183,255},
+  {"WC9 Ia",-7.0,164,185,255},
+  {"WN0 Ia",-6.7,144,166,255},
+  {"WN1 Ia",-6.7,146,168,255},
+  {"WN2 Ia",-6.8,148,170,255},
+  {"WN3 Ia",-6.8,151,172,255},
+  {"WN4 Ia",-6.9,153,174,255},
+  {"WN5 Ia",-6.9,155,176,255},
+  {"WN6 Ia",-7.0,157,178,255},
+  {"WN7 Ia",-7.0,160,181,255},
+  {"WN8 Ia",-7.0,162,183,255},
+  {"WN9 Ia",-7.0,164,185,255},
+  {"O0 Ib",-6.5,144,166,255},
+  {"O1 Ib",-6.5,146,168,255},
+  {"O2 Ib",-6.5,148,170,255},
+  {"O3 Ib",-6.5,151,172,255},
+  {"O4 Ib",-6.5,153,174,255},
+  {"O5 Ib",-6.5,155,176,255},
+  {"O6 Ib",-6.4,157,178,255},
+  {"O7 Ib",-6.3,160,181,255},
+  {"O8 Ib",-6.2,162,183,255},
+  {"O9 Ib",-6.1,164,185,255},
+  {"B0 Ib",-6.0,161,189,255},
+  {"B1 Ib",-5.9,168,193,255},
+  {"B2 Ib",-5.9,177,196,255},
+  {"B3 Ib",-5.8,175,194,255},
+  {"B4 Ib",-5.8,187,203,255},
+  {"B5 Ib",-5.7,179,202,255},
+  {"B6 Ib",-5.6,191,207,255},
+  {"B7 Ib",-5.5,195,209,255},
+  {"B8 Ib",-5.5,182,206,255},
+  {"B9 Ib",-5.4,204,216,255},
+  {"A0 Ib",-5.3,187,206,255},
+  {"A1 Ib",-5.3,214,223,255},
+  {"A2 Ib",-5.2,199,214,255},
+  {"A3 Ib",-5.2,207,219,255},
+  {"A4 Ib",-5.1,215,224,255},
+  {"A5 Ib",-5.1,223,229,255},
+  {"A6 Ib",-5.1,219,226,255},
+  {"A7 Ib",-5.1,215,223,255},
+  {"A8 Ib",-5.1,210,221,255},
+  {"A9 Ib",-5.1,206,218,255},
+  {"F0 Ib",-5.1,202,215,255},
+  {"F1 Ib",-5.1,223,229,255},
+  {"F2 Ib",-5.0,244,243,255},
+  {"F3 Ib",-5.0,236,237,255},
+  {"F4 Ib",-4.9,227,231,255},
+  {"F5 Ib",-4.9,219,225,255},
+  {"F6 Ib",-4.9,255,234,252},
+  {"F7 Ib",-4.8,255,243,250},
+  {"F8 Ib",-4.8,255,252,247},
+  {"F9 Ib",-4.7,255,246,233},
+  {"G0 Ib",-4.7,255,239,219},
+  {"G1 Ib",-4.7,255,238,212},
+  {"G2 Ib",-4.7,255,236,205},
+  {"G3 Ib",-4.6,255,231,203},
+  {"G4 Ib",-4.6,255,231,193},
+  {"G5 Ib",-4.6,255,230,183},
+  {"G6 Ib",-4.6,255,227,178},
+  {"G7 Ib",-4.6,255,223,172},
+  {"G8 Ib",-4.7,255,220,167},
+  {"G9 Ib",-4.7,255,221,174},
+  {"K0 Ib",-4.7,255,221,181},
+  {"K1 Ib",-4.7,255,220,177},
+  {"K2 Ib",-4.8,255,211,135},
+  {"K3 Ib",-4.9,255,204,128},
+  {"K4 Ib",-5.0,255,201,118},
+  {"K5 Ib",-5.1,255,209,154},
+  {"K6 Ib",-5.2,255,208,152},
+  {"K7 Ib",-5.3,255,207,150},
+  {"K8 Ib",-5.3,255,206,147},
+  {"K9 Ib",-5.4,255,205,145},
+  {"M0 Ib",-5.5,255,204,143},
+  {"M1 Ib",-5.5,255,202,138},
+  {"M2 Ib",-5.5,255,193,104},
+  {"M3 Ib",-5.5,255,192,118},
+  {"M4 Ib",-5.5,255,185,104},
+  {"M5 Ib",-5.5,255,178,78},
+  {"M6 Ib",-5.4,255,171,52},
+  {"M7 Ib",-5.3,255,164,26},
+  {"M8 Ib",-5.1,255,157,0},
+  {"M9 Ib",-5.0,255,157,0},
+  {"R0 Ib",-4.6,255,231,193},
+  {"R1 Ib",-4.6,255,228,187},
+  {"R2 Ib",-4.7,255,225,182},
+  {"R3 Ib",-4.7,255,222,176},
+  {"R4 Ib",-4.8,255,219,171},
+  {"R5 Ib",-5.0,255,216,165},
+  {"R6 Ib",-5.3,255,213,160},
+  {"R7 Ib",-5.4,255,210,154},
+  {"R8 Ib",-5.4,255,207,149},
+  {"R9 Ib",-5.5,255,204,143},
+  {"S0 Ib",-5.5,255,204,143},
+  {"S1 Ib",-5.5,255,202,138},
+  {"S2 Ib",-5.5,255,193,104},
+  {"S3 Ib",-5.5,255,192,118},
+  {"S4 Ib",-5.5,255,185,104},
+  {"S5 Ib",-5.5,255,178,78},
+  {"S6 Ib",-5.4,255,171,52},
+  {"S7 Ib",-5.3,255,164,26},
+  {"S8 Ib",-5.1,255,157,0},
+  {"S9 Ib",-5.0,255,157,0},
+  {"N0 Ib",-5.5,255,204,143},
+  {"N1 Ib",-5.5,255,202,138},
+  {"N2 Ib",-5.5,255,193,104},
+  {"N3 Ib",-5.5,255,192,118},
+  {"N4 Ib",-5.5,255,185,104},
+  {"N5 Ib",-5.5,255,178,78},
+  {"N6 Ib",-5.4,255,171,52},
+  {"N7 Ib",-5.3,255,164,26},
+  {"N8 Ib",-5.1,255,157,0},
+  {"N9 Ib",-5.0,255,157,0},
+  {"C0 Ib",-4.6,255,231,193},
+  {"C1 Ib",-4.6,255,222,172},
+  {"C2 Ib",-4.7,255,214,150},
+  {"C3 Ib",-4.7,255,206,129},
+  {"C4 Ib",-4.8,255,198,107},
+  {"C5 Ib",-5.0,255,190,86},
+  {"C6 Ib",-5.3,255,182,64},
+  {"C7 Ib",-5.4,255,173,43},
+  {"C8 Ib",-5.3,255,165,21},
+  {"C9 Ib",-5.2,255,157,0},
+  {"WC0 Ib",-6.5,144,166,255},
+  {"WC1 Ib",-6.5,146,168,255},
+  {"WC2 Ib",-6.5,148,170,255},
+  {"WC3 Ib",-6.5,151,172,255},
+  {"WC4 Ib",-6.5,153,174,255},
+  {"WC5 Ib",-6.5,155,176,255},
+  {"WC6 Ib",-6.4,157,178,255},
+  {"WC7 Ib",-6.3,160,181,255},
+  {"WC8 Ib",-6.2,162,183,255},
+  {"WC9 Ib",-6.1,164,185,255},
+  {"WN0 Ib",-6.5,144,166,255},
+  {"WN1 Ib",-6.5,146,168,255},
+  {"WN2 Ib",-6.5,148,170,255},
+  {"WN3 Ib",-6.5,151,172,255},
+  {"WN4 Ib",-6.5,153,174,255},
+  {"WN5 Ib",-6.5,155,176,255},
+  {"WN6 Ib",-6.4,157,178,255},
+  {"WN7 Ib",-6.3,160,181,255},
+  {"WN8 Ib",-6.2,162,183,255},
+  {"WN9 Ib",-6.1,164,185,255},
+  {"O0 II",-6.5,144,166,255},
+  {"O1 II",-6.4,146,168,255},
+  {"O2 II",-6.4,148,170,255},
+  {"O3 II",-6.3,149,173,255},
+  {"O4 II",-6.2,151,175,255},
+  {"O5 II",-6.1,153,177,255},
+  {"O6 II",-6.1,155,179,255},
+  {"O7 II",-6.0,156,181,255},
+  {"O8 II",-5.8,158,183,255},
+  {"O9 II",-5.7,160,186,255},
+  {"B0 II",-5.5,162,188,255},
+  {"B1 II",-5.3,163,190,255},
+  {"B2 II",-5.1,165,192,255},
+  {"B3 II",-4.9,168,193,255},
+  {"B4 II",-4.7,172,194,255},
+  {"B5 II",-4.5,175,195,255},
+  {"B6 II",-4.2,177,196,255},
+  {"B7 II",-4.0,179,198,255},
+  {"B8 II",-3.8,181,199,255},
+  {"B9 II",-3.6,182,201,255},
+  {"A0 II",-3.4,184,202,255},
+  {"A1 II",-3.3,186,204,255},
+  {"A2 II",-3.2,188,205,255},
+  {"A3 II",-3.0,190,207,255},
+  {"A4 II",-2.9,192,208,255},
+  {"A5 II",-2.8,194,210,255},
+  {"A6 II",-2.7,196,211,255},
+  {"A7 II",-2.7,197,213,255},
+  {"A8 II",-2.6,199,214,255},
+  {"A9 II",-2.6,201,216,255},
+  {"F0 II",-2.5,203,217,255},
+  {"F1 II",-2.5,216,225,255},
+  {"F2 II",-2.5,229,233,255},
+  {"F3 II",-2.4,235,237,255},
+  {"F4 II",-2.4,241,241,255},
+  {"F5 II",-2.4,247,242,255},
+  {"F6 II",-2.4,253,249,255},
+  {"F7 II",-2.4,255,250,251},
+  {"F8 II",-2.3,255,248,245},
+  {"F9 II",-2.3,255,246,239},
+  {"G0 II",-2.3,255,244,233},
+  {"G1 II",-2.3,255,243,227},
+  {"G2 II",-2.3,255,241,221},
+  {"G3 II",-2.4,255,239,215},
+  {"G4 II",-2.4,255,237,209},
+  {"G5 II",-2.4,255,235,203},
+  {"G6 II",-2.4,255,233,198},
+  {"G7 II",-2.4,255,231,194},
+  {"G8 II",-2.5,255,229,189},
+  {"G9 II",-2.5,255,227,184},
+  {"K0 II",-2.5,255,226,180},
+  {"K1 II",-2.5,255,224,175},
+  {"K2 II",-2.5,255,222,170},
+  {"K3 II",-2.5,255,220,166},
+  {"K4 II",-2.5,255,218,161},
+  {"K5 II",-2.5,255,216,156},
+  {"K6 II",-2.5,255,214,152},
+  {"K7 II",-2.5,255,212,147},
+  {"K8 II",-2.6,255,210,142},
+  {"K9 II",-2.6,255,209,138},
+  {"M0 II",-2.6,255,207,133},
+  {"M1 II",-2.7,255,205,128},
+  {"M2 II",-2.7,255,203,124},
+  {"M3 II",-2.8,255,201,119},
+  {"M4 II",-2.8,255,199,114},
+  {"M5 II",-2.9,255,197,110},
+  {"M6 II",-2.9,255,195,105},
+  {"M7 II",-3.0,255,193,100},
+  {"M8 II",-3.0,255,192,96},
+  {"M9 II",-3.0,255,190,91},
+  {"R0 II",-2.4,255,237,209},
+  {"R1 II",-2.4,255,234,201},
+  {"R2 II",-2.4,255,230,192},
+  {"R3 II",-2.5,255,227,184},
+  {"R4 II",-2.5,255,223,175},
+  {"R5 II",-2.5,255,220,167},
+  {"R6 II",-2.5,255,217,158},
+  {"R7 II",-2.6,255,213,150},
+  {"R8 II",-2.6,255,210,141},
+  {"R9 II",-2.6,255,207,133},
+  {"S0 II",-2.6,255,207,133},
+  {"S1 II",-2.7,255,205,128},
+  {"S2 II",-2.7,255,203,124},
+  {"S3 II",-2.8,255,201,119},
+  {"S4 II",-2.8,255,199,114},
+  {"S5 II",-2.9,255,197,110},
+  {"S6 II",-2.9,255,195,105},
+  {"S7 II",-3.0,255,193,100},
+  {"S8 II",-3.0,255,192,96},
+  {"S9 II",-3.0,255,190,91},
+  {"N0 II",-2.6,255,207,133},
+  {"N1 II",-2.7,255,205,128},
+  {"N2 II",-2.7,255,203,124},
+  {"N3 II",-2.8,255,201,119},
+  {"N4 II",-2.8,255,199,114},
+  {"N5 II",-2.9,255,197,110},
+  {"N6 II",-2.9,255,195,105},
+  {"N7 II",-3.0,255,193,100},
+  {"N8 II",-3.0,255,192,96},
+  {"N9 II",-3.0,255,190,91},
+  {"C0 II",-2.4,255,237,209},
+  {"C1 II",-2.4,255,232,196},
+  {"C2 II",-2.5,255,226,183},
+  {"C3 II",-2.6,255,221,170},
+  {"C4 II",-2.7,255,216,157},
+  {"C5 II",-2.7,255,211,143},
+  {"C6 II",-2.8,255,205,130},
+  {"C7 II",-2.9,255,200,117},
+  {"C8 II",-2.9,255,195,104},
+  {"C9 II",-3.0,255,190,91},
+  {"WC0 II",-6.5,144,166,255},
+  {"WC1 II",-6.4,146,168,255},
+  {"WC2 II",-6.4,148,170,255},
+  {"WC3 II",-6.3,149,173,255},
+  {"WC4 II",-6.2,151,175,255},
+  {"WC5 II",-6.1,153,177,255},
+  {"WC6 II",-6.1,155,179,255},
+  {"WC7 II",-6.0,156,181,255},
+  {"WC8 II",-5.8,158,183,255},
+  {"WC9 II",-5.7,160,186,255},
+  {"WN0 II",-6.5,144,166,255},
+  {"WN1 II",-6.4,146,168,255},
+  {"WN2 II",-6.4,148,170,255},
+  {"WN3 II",-6.3,149,173,255},
+  {"WN4 II",-6.2,151,175,255},
+  {"WN5 II",-6.1,153,177,255},
+  {"WN6 II",-6.1,155,179,255},
+  {"WN7 II",-6.0,156,181,255},
+  {"WN8 II",-5.8,158,183,255},
+  {"WN9 II",-5.7,160,186,255},
+  {"O0 III",-6.5,144,166,255},
+  {"O1 III",-6.3,146,168,255},
+  {"O2 III",-6.2,148,169,255},
+  {"O3 III",-6.0,150,171,255},
+  {"O4 III",-5.9,152,172,255},
+  {"O5 III",-5.7,154,174,255},
+  {"O6 III",-5.5,156,175,255},
+  {"O7 III",-5.4,158,177,255},
+  {"O8 III",-5.2,157,178,255},
+  {"O9 III",-5.1,158,177,255},
+  {"B0 III",-4.9,158,177,255},
+  {"B1 III",-4.3,158,177,255},
+  {"B2 III",-3.8,159,180,255},
+  {"B3 III",-3.2,163,187,255},
+  {"B4 III",-2.7,166,188,255},
+  {"B5 III",-2.1,168,189,255},
+  {"B6 III",-1.7,170,190,255},
+  {"B7 III",-1.4,171,191,255},
+  {"B8 III",-1.0,175,193,255},
+  {"B9 III",-0.7,178,195,255},
+  {"A0 III",-0.3,188,205,255},
+  {"A1 III",-0.1,188,204,255},
+  {"A2 III",0.1,189,204,255},
+  {"A3 III",0.2,189,203,255},
+  {"A4 III",0.4,196,209,255},
+  {"A5 III",0.6,202,215,255},
+  {"A6 III",0.8,209,219,255},
+  {"A7 III",1.0,210,219,255},
+  {"A8 III",1.1,209,219,255},
+  {"A9 III",1.3,209,219,255},
+  {"F0 III",1.5,213,222,255},
+  {"F1 III",1.5,227,232,255},
+  {"F2 III",1.6,241,241,255},
+  {"F3 III",1.6,241,241,255},
+  {"F4 III",1.6,241,240,255},
+  {"F5 III",1.5,242,240,255},
+  {"F6 III",1.4,241,240,255},
+  {"F7 III",1.3,241,240,255},
+  {"F8 III",1.2,252,248,255},
+  {"F9 III",1.1,255,246,245},
+  {"G0 III",1.0,255,242,233},
+  {"G1 III",0.9,255,243,233},
+  {"G2 III",0.8,255,243,233},
+  {"G3 III",0.6,255,243,233},
+  {"G4 III",0.5,255,243,233},
+  {"G5 III",0.4,255,236,211},
+  {"G6 III",0.4,255,236,215},
+  {"G7 III",0.4,255,234,207},
+  {"G8 III",0.5,255,231,199},
+  {"G9 III",0.5,255,231,196},
+  {"K0 III",0.5,255,227,190},
+  {"K1 III",0.4,255,223,181},
+  {"K2 III",0.2,255,221,175},
+  {"K3 III",0.1,255,216,167},
+  {"K4 III",-0.1,255,211,146},
+  {"K5 III",-0.2,255,204,138},
+  {"K6 III",-0.3,255,206,140},
+  {"K7 III",-0.4,255,208,142},
+  {"K8 III",-0.5,255,206,139},
+  {"K9 III",-0.6,255,205,135},
+  {"M0 III",-0.7,255,203,132},
+  {"M1 III",-0.7,255,200,121},
+  {"M2 III",-0.6,255,198,118},
+  {"M3 III",-0.6,255,200,119},
+  {"M4 III",-0.5,255,206,127},
+  {"M5 III",-0.5,255,197,124},
+  {"M6 III",-0.4,255,178,121},
+  {"M7 III",-0.3,255,165,97},
+  {"M8 III",-0.1,255,167,97},
+  {"M9 III",0.0,255,233,154},
+  {"R0 III",0.5,255,243,233},
+  {"R1 III",0.4,255,239,222},
+  {"R2 III",0.2,255,234,211},
+  {"R3 III",0.1,255,230,199},
+  {"R4 III",0.0,255,225,188},
+  {"R5 III",-0.2,255,221,177},
+  {"R6 III",-0.3,255,216,166},
+  {"R7 III",-0.4,255,212,154},
+  {"R8 III",-0.6,255,207,143},
+  {"R9 III",-0.7,255,203,132},
+  {"S0 III",-0.7,255,203,132},
+  {"S1 III",-0.7,255,200,121},
+  {"S2 III",-0.6,255,198,118},
+  {"S3 III",-0.6,255,200,119},
+  {"S4 III",-0.5,255,206,127},
+  {"S5 III",-0.5,255,197,124},
+  {"S6 III",-0.4,255,178,121},
+  {"S7 III",-0.3,255,165,97},
+  {"S8 III",-0.1,255,167,97},
+  {"S9 III",0.0,255,233,154},
+  {"N0 III",-0.7,255,203,132},
+  {"N1 III",-0.7,255,200,121},
+  {"N2 III",-0.6,255,198,118},
+  {"N3 III",-0.6,255,200,119},
+  {"N4 III",-0.5,255,206,127},
+  {"N5 III",-0.5,255,197,124},
+  {"N6 III",-0.4,255,178,121},
+  {"N7 III",-0.3,255,165,97},
+  {"N8 III",-0.1,255,167,97},
+  {"N9 III",0.0,255,233,154},
+  {"C0 III",0.5,255,243,233},
+  {"C1 III",0.3,255,242,224},
+  {"C2 III",0.1,255,241,215},
+  {"C3 III",-0.1,255,240,207},
+  {"C4 III",-0.3,255,239,198},
+  {"C5 III",-0.5,255,237,189},
+  {"C6 III",-0.7,255,236,180},
+  {"C7 III",-0.5,255,235,172},
+  {"C8 III",-0.2,255,234,163},
+  {"C9 III",0.0,255,233,154},
+  {"WC0 III",-6.5,144,166,255},
+  {"WC1 III",-6.3,146,168,255},
+  {"WC2 III",-6.2,148,169,255},
+  {"WC3 III",-6.0,150,171,255},
+  {"WC4 III",-5.9,152,172,255},
+  {"WC5 III",-5.7,154,174,255},
+  {"WC6 III",-5.5,156,175,255},
+  {"WC7 III",-5.4,158,177,255},
+  {"WC8 III",-5.2,157,178,255},
+  {"WC9 III",-5.1,158,177,255},
+  {"WN0 III",-6.5,144,166,255},
+  {"WN1 III",-6.3,146,168,255},
+  {"WN2 III",-6.2,148,169,255},
+  {"WN3 III",-6.0,150,171,255},
+  {"WN4 III",-5.9,152,172,255},
+  {"WN5 III",-5.7,154,174,255},
+  {"WN6 III",-5.5,156,175,255},
+  {"WN7 III",-5.4,158,177,255},
+  {"WN8 III",-5.2,157,178,255},
+  {"WN9 III",-5.1,158,177,255},
+  {"O0 IV",-6.0,144,166,255},
+  {"O1 IV",-5.9,145,167,255},
+  {"O2 IV",-5.8,146,169,255},
+  {"O3 IV",-5.7,148,170,255},
+  {"O4 IV",-5.6,149,171,255},
+  {"O5 IV",-5.5,150,172,255},
+  {"O6 IV",-5.3,151,174,255},
+  {"O7 IV",-5.1,152,175,255},
+  {"O8 IV",-4.9,153,176,255},
+  {"O9 IV",-4.7,155,177,255},
+  {"B0 IV",-4.5,156,179,255},
+  {"B1 IV",-3.9,157,180,255},
+  {"B2 IV",-3.4,159,179,255},
+  {"B3 IV",-2.8,166,188,255},
+  {"B4 IV",-2.3,169,190,255},
+  {"B5 IV",-1.7,172,192,255},
+  {"B6 IV",-1.3,175,194,255},
+  {"B7 IV",-0.9,170,189,255},
+  {"B8 IV",-0.5,175,193,255},
+  {"B9 IV",-0.1,180,197,255},
+  {"A0 IV",0.3,179,197,255},
+  {"A1 IV",0.5,183,200,255},
+  {"A2 IV",0.7,186,202,255},
+  {"A3 IV",1.0,190,205,255},
+  {"A4 IV",1.2,195,210,255},
+  {"A5 IV",1.4,212,220,255},
+  {"A6 IV",1.6,202,214,255},
+  {"A7 IV",1.7,192,207,255},
+  {"A8 IV",1.9,208,217,255},
+  {"A9 IV",2.0,224,227,255},
+  {"F0 IV",2.2,218,224,255},
+  {"F1 IV",2.1,223,227,255},
+  {"F2 IV",1.9,227,230,255},
+  {"F3 IV",1.8,227,230,255},
+  {"F4 IV",1.6,234,235,255},
+  {"F5 IV",1.5,241,239,255},
+  {"F6 IV",1.8,241,239,255},
+  {"F7 IV",2.1,240,239,255},
+  {"F8 IV",2.3,255,252,253},
+  {"F9 IV",2.6,255,250,249},
+  {"G0 IV",2.9,255,248,245},
+  {"G1 IV",2.9,255,246,244},
+  {"G2 IV",2.9,255,244,242},
+  {"G3 IV",3.0,255,238,226},
+  {"G4 IV",3.0,255,245,238},
+  {"G5 IV",3.0,255,235,213},
+  {"G6 IV",3.0,255,242,234},
+  {"G7 IV",3.0,255,231,205},
+  {"G8 IV",3.1,255,233,211},
+  {"G9 IV",3.1,255,229,200},
+  {"K0 IV",3.1,255,225,189},
+  {"K1 IV",3.1,255,216,171},
+  {"K2 IV",3.1,255,229,202},
+  {"K3 IV",3.1,255,219,167},
+  {"K4 IV",3.1,255,218,166},
+  {"K5 IV",3.2,255,217,165},
+  {"K6 IV",3.2,255,216,164},
+  {"K7 IV",3.2,255,216,163},
+  {"K8 IV",3.2,255,215,162},
+  {"K9 IV",3.2,255,214,161},
+  {"M0 IV",3.2,255,213,160},
+  {"M1 IV",3.2,255,212,159},
+  {"M2 IV",3.2,255,211,157},
+  {"M3 IV",3.2,255,210,156},
+  {"M4 IV",3.2,255,209,155},
+  {"M5 IV",3.3,255,209,154},
+  {"M6 IV",3.3,255,208,153},
+  {"M7 IV",3.3,255,207,152},
+  {"M8 IV",3.3,255,206,151},
+  {"M9 IV",3.3,255,205,150},
+  {"R0 IV",3.0,255,245,238},
+  {"R1 IV",3.0,255,241,229},
+  {"R2 IV",3.0,255,238,221},
+  {"R3 IV",3.1,255,234,212},
+  {"R4 IV",3.1,255,231,203},
+  {"R5 IV",3.1,255,227,194},
+  {"R6 IV",3.1,255,224,186},
+  {"R7 IV",3.2,255,220,177},
+  {"R8 IV",3.2,255,216,168},
+  {"R9 IV",3.2,255,213,160},
+  {"S0 IV",3.2,255,213,160},
+  {"S1 IV",3.2,255,212,159},
+  {"S2 IV",3.2,255,211,157},
+  {"S3 IV",3.2,255,210,156},
+  {"S4 IV",3.2,255,209,155},
+  {"S5 IV",3.3,255,209,154},
+  {"S6 IV",3.3,255,208,153},
+  {"S7 IV",3.3,255,207,152},
+  {"S8 IV",3.3,255,206,151},
+  {"S9 IV",3.3,255,205,150},
+  {"N0 IV",3.2,255,213,160},
+  {"N1 IV",3.2,255,212,159},
+  {"N2 IV",3.2,255,211,157},
+  {"N3 IV",3.2,255,210,156},
+  {"N4 IV",3.2,255,209,155},
+  {"N5 IV",3.3,255,209,154},
+  {"N6 IV",3.3,255,208,153},
+  {"N7 IV",3.3,255,207,152},
+  {"N8 IV",3.3,255,206,151},
+  {"N9 IV",3.3,255,205,150},
+  {"C0 IV",3.0,255,245,238},
+  {"C1 IV",3.0,255,241,228},
+  {"C2 IV",3.1,255,236,218},
+  {"C3 IV",3.1,255,232,209},
+  {"C4 IV",3.1,255,227,199},
+  {"C5 IV",3.2,255,223,189},
+  {"C6 IV",3.2,255,218,179},
+  {"C7 IV",3.2,255,214,170},
+  {"C8 IV",3.3,255,209,160},
+  {"C9 IV",3.3,255,205,150},
+  {"WC0 IV",-6.0,144,166,255},
+  {"WC1 IV",-5.9,145,167,255},
+  {"WC2 IV",-5.8,146,169,255},
+  {"WC3 IV",-5.7,148,170,255},
+  {"WC4 IV",-5.6,149,171,255},
+  {"WC5 IV",-5.5,150,172,255},
+  {"WC6 IV",-5.3,151,174,255},
+  {"WC7 IV",-5.1,152,175,255},
+  {"WC8 IV",-4.9,153,176,255},
+  {"WC9 IV",-4.7,155,177,255},
+  {"WN0 IV",-6.0,144,166,255},
+  {"WN1 IV",-5.9,145,167,255},
+  {"WN2 IV",-5.8,146,169,255},
+  {"WN3 IV",-5.7,148,170,255},
+  {"WN4 IV",-5.6,149,171,255},
+  {"WN5 IV",-5.5,150,172,255},
+  {"WN6 IV",-5.3,151,174,255},
+  {"WN7 IV",-5.1,152,175,255},
+  {"WN8 IV",-4.9,153,176,255},
+  {"WN9 IV",-4.7,155,177,255},
+  {"O0 V",-5.9,144,166,255},
+  {"O1 V",-5.8,146,168,255},
+  {"O2 V",-5.7,148,170,255},
+  {"O3 V",-5.6,151,172,255},
+  {"O4 V",-5.5,153,174,255},
+  {"O5 V",-5.4,155,176,255},
+  {"O6 V",-5.1,162,184,255},
+  {"O7 V",-4.7,157,177,255},
+  {"O8 V",-4.4,157,177,255},
+  {"O9 V",-4.0,154,178,255},
+  {"B0 V",-3.7,156,178,255},
+  {"B1 V",-3.2,160,182,255},
+  {"B2 V",-2.6,160,180,255},
+  {"B3 V",-2.1,165,185,255},
+  {"B4 V",-1.5,164,184,255},
+  {"B5 V",-1.0,170,191,255},
+  {"B6 V",-0.7,172,189,255},
+  {"B7 V",-0.4,173,191,255},
+  {"B8 V",0.0,177,195,255},
+  {"B9 V",0.3,181,198,255},
+  {"A0 V",0.6,185,201,255},
+  {"A1 V",0.9,181,199,255},
+  {"A2 V",1.1,187,203,255},
+  {"A3 V",1.4,191,207,255},
+  {"A4 V",1.6,197,211,255},
+  {"A5 V",1.9,202,215,255},
+  {"A6 V",2.0,199,212,255},
+  {"A7 V",2.2,200,213,255},
+  {"A8 V",2.3,213,222,255},
+  {"A9 V",2.5,219,224,255},
+  {"F0 V",2.6,224,229,255},
+  {"F1 V",2.8,230,234,255},
+  {"F2 V",2.9,236,239,255},
+  {"F3 V",3.1,230,233,255},
+  {"F4 V",3.2,224,226,255},
+  {"F5 V",3.4,248,247,255},
+  {"F6 V",3.6,244,241,255},
+  {"F7 V",3.8,246,243,255},
+  {"F8 V",3.9,255,247,252},
+  {"F9 V",4.1,255,247,252},
+  {"G0 V",4.3,255,248,252},
+  {"G1 V",4.5,255,247,248},
+  {"G2 V",4.7,255,245,242},
+  {"G3 V",4.8,255,243,236},
+  {"G4 V",5.0,255,241,229},
+  {"G5 V",5.2,255,244,234},
+  {"G6 V",5.3,255,244,235},
+  {"G7 V",5.5,255,244,235},
+  {"G8 V",5.6,255,237,222},
+  {"G9 V",5.8,255,239,221},
+  {"K0 V",5.9,255,238,221},
+  {"K1 V",6.2,255,224,188},
+  {"K2 V",6.4,255,227,196},
+  {"K3 V",6.7,255,222,195},
+  {"K4 V",6.9,255,216,181},
+  {"K5 V",7.2,255,210,161},
+  {"K6 V",7.6,255,205,152},
+  {"K7 V",7.9,255,199,142},
+  {"K8 V",8.3,255,209,174},
+  {"K9 V",8.6,255,202,157},
+  {"M0 V",9.0,255,195,139},
+  {"M1 V",10.1,255,204,142},
+  {"M2 V",11.2,255,196,131},
+  {"M3 V",12.3,255,206,129},
+  {"M4 V",13.4,255,201,127},
+  {"M5 V",14.6,255,204,111},
+  {"M6 V",15.7,255,195,112},
+  {"M7 V",16.8,255,197,111},
+  {"M8 V",17.9,255,198,109},
+  {"M9 V",19.0,255,198,108},
+  {"R0 V",5.0,255,241,229},
+  {"R1 V",5.3,255,238,222},
+  {"R2 V",5.6,255,235,216},
+  {"R3 V",5.9,255,233,209},
+  {"R4 V",6.1,255,230,203},
+  {"R5 V",6.4,255,227,196},
+  {"R6 V",6.7,255,219,182},
+  {"R7 V",7.5,255,211,168},
+  {"R8 V",8.2,255,203,153},
+  {"R9 V",9.0,255,195,139},
+  {"S0 V",9.0,255,195,139},
+  {"S1 V",10.1,255,204,142},
+  {"S2 V",11.2,255,196,131},
+  {"S3 V",12.3,255,206,129},
+  {"S4 V",13.4,255,201,127},
+  {"S5 V",14.6,255,204,111},
+  {"S6 V",15.7,255,195,112},
+  {"S7 V",16.8,255,197,111},
+  {"S8 V",17.9,255,198,109},
+  {"S9 V",19.0,255,198,108},
+  {"N0 V",9.0,255,195,139},
+  {"N1 V",10.1,255,204,142},
+  {"N2 V",11.2,255,196,131},
+  {"N3 V",12.3,255,206,129},
+  {"N4 V",13.4,255,201,127},
+  {"N5 V",14.6,255,204,111},
+  {"N6 V",15.7,255,195,112},
+  {"N7 V",16.8,255,197,111},
+  {"N8 V",17.9,255,198,109},
+  {"N9 V",19.0,255,198,108},
+  {"C0 V",5.0,255,241,229},
+  {"C1 V",5.6,255,235,218},
+  {"C2 V",6.7,255,228,207},
+  {"C3 V",7.9,255,222,196},
+  {"C4 V",9.0,255,215,185},
+  {"C5 V",12.3,255,209,174},
+  {"C6 V",14.6,255,206,158},
+  {"C7 V",16.8,255,204,141},
+  {"C8 V",17.9,255,201,125},
+  {"C9 V",19.0,255,198,108},
+  {"WC0 V",-5.9,144,166,255},
+  {"WC1 V",-5.8,146,168,255},
+  {"WC2 V",-5.7,148,170,255},
+  {"WC3 V",-5.6,151,172,255},
+  {"WC4 V",-5.5,153,174,255},
+  {"WC5 V",-5.4,155,176,255},
+  {"WC6 V",-5.1,162,184,255},
+  {"WC7 V",-4.7,157,177,255},
+  {"WC8 V",-4.4,157,177,255},
+  {"WC9 V",-4.0,154,178,255},
+  {"WN0 V",-5.9,144,166,255},
+  {"WN1 V",-5.8,146,168,255},
+  {"WN2 V",-5.7,148,170,255},
+  {"WN3 V",-5.6,151,172,255},
+  {"WN4 V",-5.5,153,174,255},
+  {"WN5 V",-5.4,155,176,255},
+  {"WN6 V",-5.1,162,184,255},
+  {"WN7 V",-4.7,157,177,255},
+  {"WN8 V",-4.4,157,177,255},
+  {"WN9 V",-4.0,154,178,255},
+  {"O0 VI",-5.6,144,166,255},
+  {"O1 VI",-5.5,146,168,255},
+  {"O2 VI",-5.4,148,170,255},
+  {"O3 VI",-5.3,151,172,255},
+  {"O4 VI",-5.2,153,174,255},
+  {"O5 VI",-5.1,155,176,255},
+  {"O6 VI",-4.7,162,184,255},
+  {"O7 VI",-4.3,157,177,255},
+  {"O8 VI",-3.8,157,177,255},
+  {"O9 VI",-3.4,154,178,255},
+  {"B0 VI",-3.0,156,178,255},
+  {"B1 VI",-2.5,160,182,255},
+  {"B2 VI",-2.0,160,180,255},
+  {"B3 VI",-1.4,165,185,255},
+  {"B4 VI",-0.9,164,184,255},
+  {"B5 VI",-0.4,170,191,255},
+  {"B6 VI",0.0,172,189,255},
+  {"B7 VI",0.4,173,191,255},
+  {"B8 VI",0.8,177,195,255},
+  {"B9 VI",1.2,181,198,255},
+  {"A0 VI",1.6,185,201,255},
+  {"A1 VI",1.9,181,199,255},
+  {"A2 VI",2.1,187,203,255},
+  {"A3 VI",2.4,191,207,255},
+  {"A4 VI",2.6,197,211,255},
+  {"A5 VI",2.9,202,215,255},
+  {"A6 VI",3.1,199,212,255},
+  {"A7 VI",3.3,200,213,255},
+  {"A8 VI",3.5,213,222,255},
+  {"A9 VI",3.7,219,224,255},
+  {"F0 VI",3.9,224,229,255},
+  {"F1 VI",4.1,230,234,255},
+  {"F2 VI",4.3,236,239,255},
+  {"F3 VI",4.4,230,233,255},
+  {"F4 VI",4.6,224,226,255},
+  {"F5 VI",4.8,248,247,255},
+  {"F6 VI",5.0,244,241,255},
+  {"F7 VI",5.1,246,243,255},
+  {"F8 VI",5.3,255,247,252},
+  {"F9 VI",5.4,255,247,252},
+  {"G0 VI",5.6,255,248,252},
+  {"G1 VI",5.8,255,247,248},
+  {"G2 VI",6.0,255,245,242},
+  {"G3 VI",6.1,255,243,236},
+  {"G4 VI",6.3,255,241,229},
+  {"G5 VI",6.5,255,244,234},
+  {"G6 VI",6.7,255,244,235},
+  {"G7 VI",6.8,255,244,235},
+  {"G8 VI",7.0,255,237,222},
+  {"G9 VI",7.1,255,239,221},
+  {"K0 VI",7.3,255,238,221},
+  {"K1 VI",7.5,255,224,188},
+  {"K2 VI",7.7,255,227,196},
+  {"K3 VI",8.0,255,222,195},
+  {"K4 VI",8.2,255,216,181},
+  {"K5 VI",8.4,255,210,161},
+  {"K6 VI",8.7,255,205,152},
+  {"K7 VI",9.0,255,199,142},
+  {"K8 VI",9.4,255,209,174},
+  {"K9 VI",9.9,255,202,157},
+  {"M0 VI",10.3,255,195,139},
+  {"M1 VI",11.4,255,204,142},
+  {"M2 VI",12.6,255,196,131},
+  {"M3 VI",13.7,255,206,129},
+  {"M4 VI",14.9,255,201,127},
+  {"M5 VI",16.0,255,204,111},
+  {"M6 VI",16.8,255,195,112},
+  {"M7 VI",17.5,255,197,111},
+  {"M8 VI",18.3,255,198,109},
+  {"M9 VI",19.0,255,198,108},
+  {"R0 VI",6.3,255,241,229},
+  {"R1 VI",6.7,255,238,222},
+  {"R2 VI",7.0,255,235,216},
+  {"R3 VI",7.3,255,233,209},
+  {"R4 VI",7.7,255,230,203},
+  {"R5 VI",8.2,255,227,196},
+  {"R6 VI",8.7,255,219,182},
+  {"R7 VI",9.4,255,211,168},
+  {"R8 VI",9.9,255,203,153},
+  {"R9 VI",10.3,255,195,139},
+  {"S0 VI",10.3,255,195,139},
+  {"S1 VI",11.4,255,204,142},
+  {"S2 VI",12.6,255,196,131},
+  {"S3 VI",13.7,255,206,129},
+  {"S4 VI",14.9,255,201,127},
+  {"S5 VI",16.0,255,204,111},
+  {"S6 VI",16.8,255,195,112},
+  {"S7 VI",17.5,255,197,111},
+  {"S8 VI",18.3,255,198,109},
+  {"S9 VI",19.0,255,198,108},
+  {"N0 VI",10.3,255,195,139},
+  {"N1 VI",11.4,255,204,142},
+  {"N2 VI",12.6,255,196,131},
+  {"N3 VI",13.7,255,206,129},
+  {"N4 VI",14.9,255,201,127},
+  {"N5 VI",16.0,255,204,111},
+  {"N6 VI",16.8,255,195,112},
+  {"N7 VI",17.5,255,197,111},
+  {"N8 VI",18.3,255,198,109},
+  {"N9 VI",19.0,255,198,108},
+  {"C0 VI",6.3,255,241,229},
+  {"C1 VI",7.0,255,235,218},
+  {"C2 VI",7.5,255,228,207},
+  {"C3 VI",8.2,255,222,196},
+  {"C4 VI",9.0,255,215,185},
+  {"C5 VI",10.3,255,209,174},
+  {"C6 VI",13.7,255,206,158},
+  {"C7 VI",16.8,255,204,141},
+  {"C8 VI",18.3,255,201,125},
+  {"C9 VI",19.0,255,198,108},
+  {"WC0 VI",-5.6,144,166,255},
+  {"WC1 VI",-5.5,146,168,255},
+  {"WC2 VI",-5.4,148,170,255},
+  {"WC3 VI",-5.3,151,172,255},
+  {"WC4 VI",-5.2,153,174,255},
+  {"WC5 VI",-5.1,155,176,255},
+  {"WC6 VI",-4.7,162,184,255},
+  {"WC7 VI",-4.3,157,177,255},
+  {"WC8 VI",-3.8,157,177,255},
+  {"WC9 VI",-3.4,154,178,255},
+  {"WN0 VI",-5.6,144,166,255},
+  {"WN1 VI",-5.5,146,168,255},
+  {"WN2 VI",-5.4,148,170,255},
+  {"WN3 VI",-5.3,151,172,255},
+  {"WN4 VI",-5.2,153,174,255},
+  {"WN5 VI",-5.1,155,176,255},
+  {"WN6 VI",-4.7,162,184,255},
+  {"WN7 VI",-4.3,157,177,255},
+  {"WN8 VI",-3.8,157,177,255},
+  {"WN9 VI",-3.4,154,178,255},
+  {"DA0",10.2,155,178,255},
+  {"DA1",10.8,159,181,255},
+  {"DA2",11.4,168,189,255},
+  {"DA3",11.9,179,197,255},
+  {"DA4",12.5,192,207,255},
+  {"DA5",13.1,207,218,255},
+  {"DA6",13.7,224,230,255},
+  {"DA7",14.2,243,243,255},
+  {"DA8",14.8,255,247,245},
+  {"DA9",15.4,255,239,225},
+  {"DB0",10.2,155,178,255},
+  {"DB1",10.8,159,181,255},
+  {"DB2",11.4,168,189,255},
+  {"DB3",11.9,179,197,255},
+  {"DB4",12.5,192,207,255},
+  {"DB5",13.1,207,218,255},
+  {"DB6",13.7,224,230,255},
+  {"DB7",14.2,243,243,255},
+  {"DB8",14.8,255,247,245},
+  {"DB9",15.4,255,239,225},
+  {"DC0",10.2,155,178,255},
+  {"DC1",10.8,159,181,255},
+  {"DC2",11.4,168,189,255},
+  {"DC3",11.9,179,197,255},
+  {"DC4",12.5,192,207,255},
+  {"DC5",13.1,207,218,255},
+  {"DC6",13.7,224,230,255},
+  {"DC7",14.2,243,243,255},
+  {"DC8",14.8,255,247,245},
+  {"DC9",15.4,255,239,225},
+  {"DO0",10.2,155,178,255},
+  {"DO1",10.8,159,181,255},
+  {"DO2",11.4,168,189,255},
+  {"DO3",11.9,179,197,255},
+  {"DO4",12.5,192,207,255},
+  {"DO5",13.1,207,218,255},
+  {"DO6",13.7,224,230,255},
+  {"DO7",14.2,243,243,255},
+  {"DO8",14.8,255,247,245},
+  {"DO9",15.4,255,239,225},
+  {"DZ0",10.2,155,178,255},
+  {"DZ1",10.8,159,181,255},
+  {"DZ2",11.4,168,189,255},
+  {"DZ3",11.9,179,197,255},
+  {"DZ4",12.5,192,207,255},
+  {"DZ5",13.1,207,218,255},
+  {"DZ6",13.7,224,230,255},
+  {"DZ7",14.2,243,243,255},
+  {"DZ8",14.8,255,247,245},
+  {"DZ9",15.4,255,239,225},
+  {"DQ0",10.2,155,178,255},
+  {"DQ1",10.8,159,181,255},
+  {"DQ2",11.4,168,189,255},
+  {"DQ3",11.9,179,197,255},
+  {"DQ4",12.5,192,207,255},
+  {"DQ5",13.1,207,218,255},
+  {"DQ6",13.7,224,230,255},
+  {"DQ7",14.2,243,243,255},
+  {"DQ8",14.8,255,247,245},
+  {"DQ9",15.4,255,239,225},
+  {NULL, 0,0,0,0},
+};
+
+const Color StellarClass::getApparentColor() const {
+  if (!color_table_init) {
+    for (int i=0; color_table[i].spectral_class != NULL; i++) {
+      StellarClass sc = parse(color_table[i].spectral_class);
+      if (sc.getSpectralClass() != StellarClass::Spectral_Unknown) {
+   mapped_color_table[sc.data] =
+     Color((unsigned char) (color_table[i].red),
+      (unsigned char) (color_table[i].green),
+      (unsigned char) (color_table[i].blue));
+      }
     }
+    color_table_init = 1;
+  }
+
+  if (mapped_color_table[data] == Color::Black) {
+    mapped_color_table[data] = Color::White;
+  }
+  return mapped_color_table[data];
 }
 
 
@@ -70,7 +1184,7 @@
 
     if (st == StellarClass::WhiteDwarf)
     {
-        strcpy(s0, "WD");
+        strcpy(s0, "D");
     }
     else if (st == StellarClass::NeutronStar)
     {
@@ -89,13 +1203,13 @@
    switch (getLuminosityClass())
         {
    case StellarClass::Lum_Ia0:
-       s2 = " I-a0";
+       s2 = " Ia0";
        break;
    case StellarClass::Lum_Ia:
-       s2 = " I-a";
+       s2 = " Ia";
        break;
    case StellarClass::Lum_Ib:
-       s2 = " I-b";
+       s2 = " Ib";
        break;
    case StellarClass::Lum_II:
        s2 = " II";
Index: stellarclass.h
===================================================================
RCS file: /cvsroot/celestia/celestia/src/celengine/stellarclass.h,v
retrieving revision 1.4
diff -u -r1.4 stellarclass.h
--- stellarclass.h   8 May 2002 07:02:27 -0000   1.4
+++ stellarclass.h   2 Jan 2003 01:23:01 -0000
@@ -58,17 +58,16 @@
 
     inline StellarClass();
     inline StellarClass(StarType,
-         SpectralClass,
-         unsigned int,
-         LuminosityClass);
+       SpectralClass,
+       unsigned int,
+       LuminosityClass);
 
     inline StarType getStarType() const;
     inline SpectralClass getSpectralClass() const;
     inline unsigned int getSpectralSubclass() const;
     inline LuminosityClass getLuminosityClass() const;
 
-    Color getApparentColor() const;
-    Color getApparentColor(StellarClass::SpectralClass sc) const;
+    const Color getApparentColor() const;
 
     char* str(char* buf, unsigned int buflen) const;
     std::string str() const;
@@ -83,13 +82,6 @@
     uint16 data;
 };
 
-
-std::ostream& operator<<(std::ostream& s, const StellarClass& sc);
-
-// A rough ordering of stellar classes, from 'early' to 'late' . . .
-// Useful for organizing a list of stars by spectral class.
-bool operator<(const StellarClass& sc0, const StellarClass& sc1);
-
 StellarClass::StellarClass(StarType t,
             SpectralClass sc,
             unsigned int ssub,
@@ -106,6 +98,12 @@
     data = 0;
 }
 
+std::ostream& operator<<(std::ostream& s, const StellarClass& sc);
+
+// A rough ordering of stellar classes, from 'early' to 'late' . . .
+// Useful for organizing a list of stars by spectral class.
+bool operator<(const StellarClass& sc0, const StellarClass& sc1);
+
 StellarClass::StarType StellarClass::getStarType() const
 {
     return (StarType) (data >> 12);
@@ -125,5 +123,7 @@
 {
     return (LuminosityClass) (data & 0xf);
 }
+
+
 
 #endif // _STELLARCLASS_H_

billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #2by billybob884 » 02.01.2003, 12:29

so, where do we put all this code?
Mike M.

TacoTopia!

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #3by selden » 02.01.2003, 19:21

Mike,

The code included in DrJoe's message is input to the sourcecode patch utility. It's only usable if you rebuild Celestia from scratch. Hopefully he's been in direct contact with the Celestia development team about this. Most of us don't have the appropriate environment to be able to do the rebuild.
Selden


Return to “Development”