Skip to content

kurt/helios-to-aeos-stripdown #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Helios/ColorConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#define RGB_CORAL_ORANGE (uint32_t)0xFF1E00 // 255, 30, 0
#define RGB_ORANGE (uint32_t)0xFF3C00 // 255, 60, 0
#define RGB_YELLOW (uint32_t)0xFF7800 // 255, 120, 0
#define RGB_AMBER (uint32_t)0xFF9D00 // 255, 157, 0
#define RGB_CHARTREUSE (uint32_t)0xC4FF00 // 196, 255, 0
#define RGB_LIME_GREEN (uint32_t)0x59FF00 // 89, 255, 0
#define RGB_GREEN (uint32_t)0x00FF00 // 0, 255, 0
#define RGB_SEAFOAM (uint32_t)0x00FF3C // 0, 255, 60
Expand All @@ -49,6 +51,7 @@
#define RGB_HOT_PINK (uint32_t)0xFF00B4 // 255, 0, 180
#define RGB_MAGENTA (uint32_t)0xFF003C // 255, 0, 60


// Helios Medium Brightness Colors
#define RGB_WHITE_BRI_MEDIUM (uint32_t)0x787878 // 120 120 120
#define RGB_RED_BRI_MEDIUM (uint32_t)0x780000 // 120, 0, 0
Expand Down
10 changes: 10 additions & 0 deletions Helios/Colorset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ void Colorset::set(uint8_t index, RGBColor col)
m_palette[index] = col;
}

void Colorset::setAll(const RGBColor* colors, uint8_t num_colors)
{
// First clear existing colors
clear();
// Then set new colors up to num_colors
for (uint8_t i = 0; i < num_colors && i < NUM_COLOR_SLOTS; i++) {
set(i, colors[i]);
}
}

// skip some amount of colors
void Colorset::skip(int32_t amount)
{
Expand Down
3 changes: 3 additions & 0 deletions Helios/Colorset.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ class Colorset
// a slot higher than the number of colors in the colorset
void set(uint8_t index, RGBColor col);

// set all colors from an array up to num_colors
void setAll(const RGBColor* colors, uint8_t num_colors);

// skip some amount of colors
void skip(int32_t amount = 1);

Expand Down
Loading
Loading