aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuouscolorscale.cpp259
-rw-r--r--continuouscolorscale.h3
2 files changed, 261 insertions, 1 deletions
diff --git a/continuouscolorscale.cpp b/continuouscolorscale.cpp
index 246dbcb..b6f6fae 100644
--- a/continuouscolorscale.cpp
+++ b/continuouscolorscale.cpp
@@ -550,6 +550,265 @@ ContinuousColorScale ContinuousColorScale::builtin(BuiltinContinuousColorScale s
QColor( 69, 68, 220),
QColor( 68, 68, 221)
};
+ case RAINBOW:
+ return ContinuousColorScale{
+ QColor( 0, 0, 0),
+ QColor( 45, 0, 36),
+ QColor( 56, 0, 46),
+ QColor( 60, 0, 49),
+ QColor( 67, 0, 54),
+ QColor( 70, 0, 59),
+ QColor( 71, 0, 61),
+ QColor( 75, 0, 68),
+ QColor( 74, 0, 73),
+ QColor( 74, 0, 77),
+ QColor( 73, 0, 81),
+ QColor( 71, 0, 87),
+ QColor( 69, 1, 90),
+ QColor( 68, 2, 94),
+ QColor( 66, 3, 97),
+ QColor( 63, 6, 102),
+ QColor( 61, 7, 106),
+ QColor( 58, 10, 109),
+ QColor( 56, 12, 113),
+ QColor( 53, 15, 116),
+ QColor( 48, 18, 119),
+ QColor( 47, 20, 121),
+ QColor( 44, 23, 124),
+ QColor( 41, 27, 128),
+ QColor( 40, 28, 129),
+ QColor( 37, 32, 132),
+ QColor( 34, 36, 134),
+ QColor( 29, 43, 137),
+ QColor( 25, 52, 138),
+ QColor( 24, 57, 139),
+ QColor( 24, 62, 141),
+ QColor( 24, 64, 142),
+ QColor( 23, 65, 142),
+ QColor( 23, 69, 143),
+ QColor( 23, 71, 142),
+ QColor( 23, 71, 142),
+ QColor( 23, 73, 142),
+ QColor( 23, 75, 142),
+ QColor( 23, 75, 142),
+ QColor( 23, 78, 142),
+ QColor( 23, 80, 142),
+ QColor( 23, 80, 142),
+ QColor( 23, 82, 141),
+ QColor( 23, 85, 141),
+ QColor( 23, 85, 141),
+ QColor( 23, 87, 140),
+ QColor( 23, 87, 140),
+ QColor( 24, 90, 140),
+ QColor( 24, 90, 140),
+ QColor( 24, 93, 139),
+ QColor( 24, 93, 139),
+ QColor( 24, 93, 139),
+ QColor( 24, 93, 139),
+ QColor( 24, 97, 139),
+ QColor( 24, 97, 139),
+ QColor( 25, 101, 138),
+ QColor( 25, 101, 138),
+ QColor( 25, 104, 137),
+ QColor( 25, 104, 137),
+ QColor( 25, 104, 137),
+ QColor( 26, 108, 137),
+ QColor( 26, 108, 137),
+ QColor( 27, 111, 136),
+ QColor( 27, 111, 136),
+ QColor( 27, 111, 136),
+ QColor( 27, 115, 135),
+ QColor( 27, 115, 135),
+ QColor( 28, 118, 134),
+ QColor( 28, 118, 134),
+ QColor( 29, 122, 133),
+ QColor( 29, 122, 133),
+ QColor( 29, 122, 133),
+ QColor( 29, 122, 133),
+ QColor( 29, 125, 132),
+ QColor( 29, 125, 132),
+ QColor( 30, 128, 131),
+ QColor( 30, 128, 131),
+ QColor( 31, 131, 130),
+ QColor( 31, 131, 130),
+ QColor( 31, 131, 130),
+ QColor( 32, 134, 128),
+ QColor( 32, 134, 128),
+ QColor( 33, 137, 127),
+ QColor( 33, 137, 127),
+ QColor( 33, 137, 127),
+ QColor( 34, 140, 125),
+ QColor( 34, 140, 125),
+ QColor( 35, 142, 123),
+ QColor( 35, 142, 123),
+ QColor( 36, 145, 121),
+ QColor( 36, 145, 121),
+ QColor( 36, 145, 121),
+ QColor( 37, 147, 118),
+ QColor( 37, 147, 118),
+ QColor( 38, 150, 116),
+ QColor( 38, 150, 116),
+ QColor( 40, 152, 113),
+ QColor( 40, 152, 113),
+ QColor( 41, 154, 111),
+ QColor( 41, 154, 111),
+ QColor( 42, 156, 108),
+ QColor( 42, 156, 108),
+ QColor( 43, 158, 106),
+ QColor( 43, 158, 106),
+ QColor( 43, 158, 106),
+ QColor( 45, 160, 104),
+ QColor( 45, 160, 104),
+ QColor( 46, 162, 101),
+ QColor( 46, 162, 101),
+ QColor( 48, 164, 99),
+ QColor( 48, 164, 99),
+ QColor( 50, 166, 97),
+ QColor( 50, 166, 97),
+ QColor( 51, 168, 95),
+ QColor( 53, 170, 93),
+ QColor( 53, 170, 93),
+ QColor( 53, 170, 93),
+ QColor( 55, 172, 91),
+ QColor( 55, 172, 91),
+ QColor( 57, 174, 88),
+ QColor( 57, 174, 88),
+ QColor( 59, 175, 86),
+ QColor( 62, 177, 84),
+ QColor( 64, 178, 82),
+ QColor( 64, 178, 82),
+ QColor( 67, 180, 80),
+ QColor( 67, 180, 80),
+ QColor( 69, 181, 79),
+ QColor( 72, 183, 77),
+ QColor( 72, 183, 77),
+ QColor( 72, 183, 77),
+ QColor( 75, 184, 76),
+ QColor( 77, 186, 74),
+ QColor( 80, 187, 73),
+ QColor( 83, 189, 72),
+ QColor( 87, 190, 72),
+ QColor( 91, 191, 71),
+ QColor( 95, 192, 70),
+ QColor( 99, 193, 70),
+ QColor(103, 194, 70),
+ QColor(107, 195, 70),
+ QColor(111, 196, 70),
+ QColor(111, 196, 70),
+ QColor(115, 196, 70),
+ QColor(119, 197, 70),
+ QColor(123, 197, 70),
+ QColor(130, 198, 71),
+ QColor(133, 199, 71),
+ QColor(137, 199, 72),
+ QColor(140, 199, 72),
+ QColor(143, 199, 73),
+ QColor(143, 199, 73),
+ QColor(147, 199, 73),
+ QColor(150, 199, 74),
+ QColor(153, 199, 74),
+ QColor(156, 199, 75),
+ QColor(160, 200, 76),
+ QColor(167, 200, 78),
+ QColor(170, 200, 79),
+ QColor(173, 200, 79),
+ QColor(173, 200, 79),
+ QColor(177, 200, 80),
+ QColor(180, 200, 81),
+ QColor(183, 199, 82),
+ QColor(186, 199, 82),
+ QColor(190, 199, 83),
+ QColor(196, 199, 85),
+ QColor(199, 198, 85),
+ QColor(199, 198, 85),
+ QColor(203, 198, 86),
+ QColor(206, 197, 87),
+ QColor(212, 197, 89),
+ QColor(215, 196, 90),
+ QColor(218, 195, 91),
+ QColor(224, 194, 94),
+ QColor(224, 194, 94),
+ QColor(230, 193, 96),
+ QColor(233, 192, 98),
+ QColor(236, 190, 100),
+ QColor(238, 189, 104),
+ QColor(240, 188, 106),
+ QColor(240, 188, 106),
+ QColor(242, 187, 110),
+ QColor(244, 185, 114),
+ QColor(245, 184, 116),
+ QColor(247, 183, 120),
+ QColor(248, 182, 123),
+ QColor(248, 182, 123),
+ QColor(250, 181, 125),
+ QColor(251, 180, 128),
+ QColor(252, 180, 130),
+ QColor(253, 180, 133),
+ QColor(253, 180, 133),
+ QColor(254, 180, 134),
+ QColor(254, 179, 138),
+ QColor(255, 179, 142),
+ QColor(255, 179, 145),
+ QColor(255, 179, 145),
+ QColor(255, 179, 152),
+ QColor(255, 180, 161),
+ QColor(255, 180, 164),
+ QColor(255, 180, 167),
+ QColor(255, 180, 167),
+ QColor(255, 181, 169),
+ QColor(255, 181, 170),
+ QColor(255, 182, 173),
+ QColor(255, 183, 176),
+ QColor(255, 183, 176),
+ QColor(255, 184, 179),
+ QColor(255, 185, 179),
+ QColor(255, 185, 182),
+ QColor(255, 186, 182),
+ QColor(255, 186, 182),
+ QColor(255, 187, 185),
+ QColor(255, 188, 185),
+ QColor(255, 189, 188),
+ QColor(255, 189, 188),
+ QColor(255, 190, 188),
+ QColor(255, 191, 191),
+ QColor(255, 192, 191),
+ QColor(255, 194, 194),
+ QColor(255, 194, 194),
+ QColor(255, 197, 197),
+ QColor(255, 198, 198),
+ QColor(255, 200, 200),
+ QColor(255, 201, 201),
+ QColor(255, 201, 201),
+ QColor(255, 202, 202),
+ QColor(255, 203, 203),
+ QColor(255, 205, 205),
+ QColor(255, 206, 206),
+ QColor(255, 206, 206),
+ QColor(255, 208, 208),
+ QColor(255, 209, 209),
+ QColor(255, 211, 211),
+ QColor(255, 215, 215),
+ QColor(255, 216, 216),
+ QColor(255, 216, 216),
+ QColor(255, 218, 218),
+ QColor(255, 219, 219),
+ QColor(255, 221, 221),
+ QColor(255, 223, 223),
+ QColor(255, 226, 226),
+ QColor(255, 228, 228),
+ QColor(255, 230, 230),
+ QColor(255, 230, 230),
+ QColor(255, 232, 232),
+ QColor(255, 235, 235),
+ QColor(255, 237, 237),
+ QColor(255, 240, 240),
+ QColor(255, 243, 243),
+ QColor(255, 246, 246),
+ QColor(255, 249, 249),
+ QColor(255, 251, 251),
+ QColor(255, 253, 253),
+ QColor(255, 255, 255)
+ };
default:
return ContinuousColorScale::builtin(ContinuousColorScale::HEATED_OBJECTS);
}
diff --git a/continuouscolorscale.h b/continuouscolorscale.h
index f734702..0f9478c 100644
--- a/continuouscolorscale.h
+++ b/continuouscolorscale.h
@@ -10,7 +10,8 @@ public:
enum BuiltinContinuousColorScale {
HEATED_OBJECTS,
- RED_GRAY_BLUE
+ RED_GRAY_BLUE,
+ RAINBOW,
};
QColor color(qreal t) const;