Files
dilemmaker/source/misc.cpp

12 lines
423 B
C++

#include "misc.h"
namespace misc
{
std::string colors[17] = { "black", "bright_black", "blue", "bright_blue", "red", "bright_red", "magenta", "bright_magenta", "green", "bright_green", "cyan", "bright_cyan", "yellow", "bright_yellow", "white", "bright_white", "transparent" };
int getColorByName(std::string color)
{
for (int i=0; i<17; ++i) if (colors[i] == color) return i;
return 0;
}
}