Colors.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Colors.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../../lib/Color.h"
  12. /**
  13. * The colors class defines color constants of type ColorRGBA.
  14. */
  15. class Colors
  16. {
  17. public:
  18. /** the h3 yellow color, typically used for headlines */
  19. static const ColorRGBA YELLOW;
  20. /** the standard h3 white color */
  21. static const ColorRGBA WHITE;
  22. /** actual 100% white color */
  23. static const ColorRGBA WHITE_TRUE;
  24. /** the metallic gold color used mostly as a border around buttons */
  25. static const ColorRGBA METALLIC_GOLD;
  26. /** green color used for in-game console */
  27. static const ColorRGBA GREEN;
  28. /** the h3 orange color, used for blocked buttons */
  29. static const ColorRGBA ORANGE;
  30. /** the h3 bright yellow color, used for selection border */
  31. static const ColorRGBA BRIGHT_YELLOW;
  32. /** default key color for all 8 & 24 bit graphics */
  33. static const ColorRGBA DEFAULT_KEY_COLOR;
  34. /// Selected creature card
  35. static const ColorRGBA RED;
  36. /// Minimap border
  37. static const ColorRGBA PURPLE;
  38. static const ColorRGBA CYAN;
  39. static const ColorRGBA BLACK;
  40. static const ColorRGBA TRANSPARENCY;
  41. /// parse color
  42. static std::optional<ColorRGBA> parseColor(std::string text);
  43. static std::string colorToHexString(const ColorRGBA& color);
  44. };