[studio/modlib] Add function for exporting selection color

This commit is contained in:
2024-05-24 22:06:48 -05:00
parent c0479604aa
commit a72b865dc9
4 changed files with 21 additions and 5 deletions

View File

@ -0,0 +1,17 @@
#pragma once
#include <nostalgia/core/color.hpp>
namespace studio {
[[nodiscard]]
constexpr nostalgia::core::Color16 applySelectionColor(
nostalgia::core::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);
}
}

View File

@ -4,6 +4,7 @@
#pragma once
#include <studio/color.hpp>
#include <studio/context.hpp>
#include <studio/editor.hpp>
#include <studio/filedialog.hpp>