diff --git a/src/nostalgia/modules/core/include/nostalgia/core/color.hpp b/src/nostalgia/modules/core/include/nostalgia/core/color.hpp index b86c4f67..c6b73ad9 100644 --- a/src/nostalgia/modules/core/include/nostalgia/core/color.hpp +++ b/src/nostalgia/modules/core/include/nostalgia/core/color.hpp @@ -152,4 +152,13 @@ static_assert(color16(16, 31, 0) == 1008); static_assert(color16(16, 31, 8) == 9200); static_assert(color16(16, 32, 8) == 9200); +[[nodiscard]] +constexpr Color16 applySelectionColor(Color16 const color) noexcept { + namespace core = nostalgia::core; + auto const r = core::red16(color) / 2; + auto const g = (core::green16(color) + 20) / 2; + auto const b = (core::blue16(color) + 31) / 2; + return core::color16(r, g, b); +} + }