No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

color.cpp 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2010-2014 OTClient <https://github.com/edubart/otclient>
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. * THE SOFTWARE.
  21. */
  22. #include "color.h"
  23. // NOTE: AABBGGRR order
  24. const Color Color::alpha = 0x00000000U;
  25. const Color Color::white = 0xffffffff;
  26. const Color Color::black = 0xff000000;
  27. const Color Color::red = 0xff0000ff;
  28. const Color Color::darkRed = 0xff000080;
  29. const Color Color::green = 0xff00ff00;
  30. const Color Color::darkGreen = 0xff008000;
  31. const Color Color::blue = 0xffff0000;
  32. const Color Color::darkBlue = 0xff800000;
  33. const Color Color::pink = 0xffff00ff;
  34. const Color Color::darkPink = 0xff800080;
  35. const Color Color::yellow = 0xff00ffff;
  36. const Color Color::darkYellow = 0xff008080;
  37. const Color Color::teal = 0xffffff00;
  38. const Color Color::darkTeal = 0xff808000;
  39. const Color Color::gray = 0xffa0a0a0;
  40. const Color Color::darkGray = 0xff808080;
  41. const Color Color::lightGray = 0xffc0c0c0;
  42. const Color Color::orange = 0xff008cff;
  43. Color::Color(const std::string& coltext)
  44. {
  45. std::stringstream ss(coltext);
  46. ss >> *this;
  47. }