4 PURPLE, PINK, LIME, SKYBLUE, MAGENTA};
9 {RED, RED, {255, 140, 0, 255}},
11 {GREEN, GREEN, {0, 200, 200, 255}},
15 {YELLOW, YELLOW, {255, 140, 0, 255}},
17 {ORANGE, ORANGE, {200, 50, 50, 255}},
19 {PURPLE, PURPLE, {180, 0, 180, 255}},
21 {PINK, PINK, {160, 60, 200, 255}},
23 {LIME, LIME, {0, 180, 60, 255}},
25 {SKYBLUE, SKYBLUE, {60, 100, 220, 255}},
27 {MAGENTA, MAGENTA, {160, 0, 200, 255}},
38 return {teamColor, teamColor,
KEEP};
43 return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
48 static const Color resourceColors[] = {
58 if (resourceIndex < 0 || resourceIndex >= 7)
return WHITE;
59 return resourceColors[resourceIndex];
static constexpr int PALETTE_SIZE
static const SlimePalette _slimePalettes[PALETTE_SIZE]
static Color getResourceColor(int resourceIndex)
Returns the designated UI/3D color for a given resource index.
static bool colorEquals(Color a, Color b)
Utility to compare two colors for equality.
static const Color _teamColors[PALETTE_SIZE]
static constexpr Color KEEP
static Color getTeamColor(int index)
Returns a unique color for a team based on its index. Will repeat if more teams than palette size.
static SlimePalette getSlimePalette(Color teamColor)
Returns a slime palette with variations based on the team color.