13 std::ofstream stream{path, std::ios::binary};
14 if (!stream.is_open()) {
19 stream <<
"JASC-PAL\r\n";
21 stream << pal.
size() <<
"\r\n";
23 for (std::size_t i = 0; i < pal.
size(); i++) {
28 stream << pal.
at(i).to_jasc_str() <<
"\r\n";
ChainableResult< void > save(const Palette< Rgba32, pal::max_size > &pal, const std::filesystem::path &path) const override
A generic palette container for colors that support transparency checking.
std::size_t size() const
Returns the number of slots in the palette.
ColorType at(std::size_t index) const
Gets the color at a specific index.
bool is_wildcard(std::size_t index) const
Checks if a slot is a wildcard.
static const Style bold
Bold text formatting.