Now have a simple color palette system.

This commit is contained in:
Zed A. Shaw 2025-07-16 12:46:49 -04:00
parent 0272ba8540
commit 48a7f72411
6 changed files with 93 additions and 2 deletions

20
tests/palette.cpp Normal file
View file

@ -0,0 +1,20 @@
#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "palette.hpp"
using namespace fmt;
TEST_CASE("color palette test", "[color-palette]") {
palette::init();
sf::Color expect{10, 10, 10, 255};
auto gui_text = palette::get("gui/text:dark");
REQUIRE(gui_text == expect);
gui_text = palette::get("gui/text:mid");
REQUIRE(gui_text != expect);
expect = {100, 100, 100, 255};
REQUIRE(gui_text == expect);
}