Skip to content

Commit

Permalink
Closes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed May 31, 2022
1 parent ed85db7 commit 9f36bfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Colors.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ typedef uint32_t color32_t;
#define COLOR32_GET_WHITE(color) ((color >> 24) & 0xFF)
#define COLOR32_GET_RED(color) ((color >> 16) & 0xFF)
#define COLOR32_GET_GREEN(color) ((color >> 8) & 0xFF)
#define COLOR32_GET_BLUE(color) (color 0xFF)
#define COLOR32_GET_BLUE(color) (color & 0xFF)
// Eases constant color declarations but should only be used for constant colors. Otherwise better use Adafruit_NeoPixel::Color() to save program memory
#define COLOR32(r,g,b) ((color32_t)(((uint32_t)r<<16)|((uint16_t)g<<8)|b)) // return ((uint32_t)r << 16) | ((uint32_t)g << 8) | b;
#define COLOR32_W(r,g,b,w) ((color32_t)(((uint32_t)w<<24)|((uint32_t)r<<16)|((uint16_t)g<<8)|b)) // return ((uint32_t)w << 24) |(uint32_t)r << 16) | ((uint32_t)g << 8) | b;
Expand Down Expand Up @@ -131,7 +131,7 @@ typedef uint32_t color32_t;
#define WHITE(color) ((color >> 24) & 0xFF)
#define RED(color) ((color >> 16) & 0xFF)
#define GREEN(color) ((color >> 8) & 0xFF)
#define BLUE(color) (color 0xFF)
#define BLUE(color) (color & 0xFF)
// end deprecated

#endif // _COLORS_H
Expand Down

0 comments on commit 9f36bfc

Please sign in to comment.