PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

colorpalettes.cpp 4.1KB

3 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. #ifndef __INC_COLORPALETTES_H
  2. #define __INC_COLORPALETTES_H
  3. #define FASTLED_INTERNAL
  4. #include "FastLED.h"
  5. #include "colorutils.h"
  6. #include "colorpalettes.h"
  7. FASTLED_USING_NAMESPACE
  8. // Preset color schemes, such as they are.
  9. // These schemes are all declared as "PROGMEM", meaning
  10. // that they won't take up SRAM on AVR chips until used.
  11. // Furthermore, the compiler won't even include these
  12. // in your PROGMEM (flash) storage unless you specifically
  13. // use each one, so you only 'pay for' those you actually use.
  14. extern const TProgmemRGBPalette16 CloudColors_p FL_PROGMEM =
  15. {
  16. CRGB::Blue,
  17. CRGB::DarkBlue,
  18. CRGB::DarkBlue,
  19. CRGB::DarkBlue,
  20. CRGB::DarkBlue,
  21. CRGB::DarkBlue,
  22. CRGB::DarkBlue,
  23. CRGB::DarkBlue,
  24. CRGB::Blue,
  25. CRGB::DarkBlue,
  26. CRGB::SkyBlue,
  27. CRGB::SkyBlue,
  28. CRGB::LightBlue,
  29. CRGB::White,
  30. CRGB::LightBlue,
  31. CRGB::SkyBlue
  32. };
  33. extern const TProgmemRGBPalette16 LavaColors_p FL_PROGMEM =
  34. {
  35. CRGB::Black,
  36. CRGB::Maroon,
  37. CRGB::Black,
  38. CRGB::Maroon,
  39. CRGB::DarkRed,
  40. CRGB::Maroon,
  41. CRGB::DarkRed,
  42. CRGB::DarkRed,
  43. CRGB::DarkRed,
  44. CRGB::Red,
  45. CRGB::Orange,
  46. CRGB::White,
  47. CRGB::Orange,
  48. CRGB::Red,
  49. CRGB::DarkRed
  50. };
  51. extern const TProgmemRGBPalette16 OceanColors_p FL_PROGMEM =
  52. {
  53. CRGB::MidnightBlue,
  54. CRGB::DarkBlue,
  55. CRGB::MidnightBlue,
  56. CRGB::Navy,
  57. CRGB::DarkBlue,
  58. CRGB::MediumBlue,
  59. CRGB::SeaGreen,
  60. CRGB::Teal,
  61. CRGB::CadetBlue,
  62. CRGB::Blue,
  63. CRGB::DarkCyan,
  64. CRGB::CornflowerBlue,
  65. CRGB::Aquamarine,
  66. CRGB::SeaGreen,
  67. CRGB::Aqua,
  68. CRGB::LightSkyBlue
  69. };
  70. extern const TProgmemRGBPalette16 ForestColors_p FL_PROGMEM =
  71. {
  72. CRGB::DarkGreen,
  73. CRGB::DarkGreen,
  74. CRGB::DarkOliveGreen,
  75. CRGB::DarkGreen,
  76. CRGB::Green,
  77. CRGB::ForestGreen,
  78. CRGB::OliveDrab,
  79. CRGB::Green,
  80. CRGB::SeaGreen,
  81. CRGB::MediumAquamarine,
  82. CRGB::LimeGreen,
  83. CRGB::YellowGreen,
  84. CRGB::LightGreen,
  85. CRGB::LawnGreen,
  86. CRGB::MediumAquamarine,
  87. CRGB::ForestGreen
  88. };
  89. /// HSV Rainbow
  90. extern const TProgmemRGBPalette16 RainbowColors_p FL_PROGMEM =
  91. {
  92. 0xFF0000, 0xD52A00, 0xAB5500, 0xAB7F00,
  93. 0xABAB00, 0x56D500, 0x00FF00, 0x00D52A,
  94. 0x00AB55, 0x0056AA, 0x0000FF, 0x2A00D5,
  95. 0x5500AB, 0x7F0081, 0xAB0055, 0xD5002B
  96. };
  97. /// HSV Rainbow colors with alternatating stripes of black
  98. #define RainbowStripesColors_p RainbowStripeColors_p
  99. extern const TProgmemRGBPalette16 RainbowStripeColors_p FL_PROGMEM =
  100. {
  101. 0xFF0000, 0x000000, 0xAB5500, 0x000000,
  102. 0xABAB00, 0x000000, 0x00FF00, 0x000000,
  103. 0x00AB55, 0x000000, 0x0000FF, 0x000000,
  104. 0x5500AB, 0x000000, 0xAB0055, 0x000000
  105. };
  106. /// HSV color ramp: blue purple ping red orange yellow (and back)
  107. /// Basically, everything but the greens, which tend to make
  108. /// people's skin look unhealthy. This palette is good for
  109. /// lighting at a club or party, where it'll be shining on people.
  110. extern const TProgmemRGBPalette16 PartyColors_p FL_PROGMEM =
  111. {
  112. 0x5500AB, 0x84007C, 0xB5004B, 0xE5001B,
  113. 0xE81700, 0xB84700, 0xAB7700, 0xABAB00,
  114. 0xAB5500, 0xDD2200, 0xF2000E, 0xC2003E,
  115. 0x8F0071, 0x5F00A1, 0x2F00D0, 0x0007F9
  116. };
  117. /// Approximate "black body radiation" palette, akin to
  118. /// the FastLED 'HeatColor' function.
  119. /// Recommend that you use values 0-240 rather than
  120. /// the usual 0-255, as the last 15 colors will be
  121. /// 'wrapping around' from the hot end to the cold end,
  122. /// which looks wrong.
  123. extern const TProgmemRGBPalette16 HeatColors_p FL_PROGMEM =
  124. {
  125. 0x000000,
  126. 0x330000, 0x660000, 0x990000, 0xCC0000, 0xFF0000,
  127. 0xFF3300, 0xFF6600, 0xFF9900, 0xFFCC00, 0xFFFF00,
  128. 0xFFFF33, 0xFFFF66, 0xFFFF99, 0xFFFFCC, 0xFFFFFF
  129. };
  130. // Gradient palette "Rainbow_gp",
  131. // provided for situations where you're going
  132. // to use a number of other gradient palettes, AND
  133. // you want a 'standard' FastLED rainbow as well.
  134. DEFINE_GRADIENT_PALETTE( Rainbow_gp ) {
  135. 0, 255, 0, 0, // Red
  136. 32, 171, 85, 0, // Orange
  137. 64, 171,171, 0, // Yellow
  138. 96, 0,255, 0, // Green
  139. 128, 0,171, 85, // Aqua
  140. 160, 0, 0,255, // Blue
  141. 192, 85, 0,171, // Purple
  142. 224, 171, 0, 85, // Pink
  143. 255, 255, 0, 0};// and back to Red
  144. #endif