Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
ColorPalette.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "raylib.h"
4
9 public:
10 struct SlimePalette {
11 Color outer; // mat[1] - outer shell. SKIP if {0,0,0,0}
12 Color inner; // mat[3] - inner body. SKIP if {0,0,0,0}
13 Color blush; // mat[2] - accent. SKIP if {0,0,0,0}
14 };
15
17 static constexpr Color KEEP = {0, 0, 0, 0};
18
25 static Color getTeamColor(int index);
26
30 static Color getResourceColor(int resourceIndex);
31
37 static SlimePalette getSlimePalette(Color teamColor);
38
45 static bool colorEquals(Color a, Color b);
46
47 static constexpr int PALETTE_SIZE = 10;
48
49 private:
50 static const Color _teamColors[PALETTE_SIZE];
52};
Centralized color palette for teams and entity materials.
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.