color.c 1.0 KB

123456789101112131415161718192021222324252627282930
  1. /*
  2. * File : color.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2009-10-16 Bernard first version
  13. */
  14. #include <rtgui/color.h>
  15. const rtgui_color_t red = RTGUI_RGB(0xff, 0x00, 0x00);
  16. const rtgui_color_t green = RTGUI_RGB(0x00, 0xff, 0x00);
  17. const rtgui_color_t blue = RTGUI_RGB(0x00, 0x00, 0xff);
  18. const rtgui_color_t black = RTGUI_RGB(0x00, 0x00, 0x00);
  19. const rtgui_color_t white = RTGUI_RGB(0xff, 0xff, 0xff);
  20. const rtgui_color_t high_light = RTGUI_RGB(0xff, 0xff, 0xff);
  21. const rtgui_color_t dark_grey = RTGUI_RGB(0x7f, 0x7f, 0x7f);
  22. const rtgui_color_t light_grey = RTGUI_RGB(0xc0, 0xc0, 0xc0);
  23. #define RTGUI_RGB_R(c) ((c) & 0xff)
  24. #define RTGUI_RGB_G(c) (((c) >> 8) & 0xff)
  25. #define RTGUI_RGB_B(c) (((c) >> 16) & 0xff)
  26. #define RTGUI_RGB_A(c) (((c) >> 24) & 0xff)