summaryrefslogtreecommitdiff
path: root/iup/test/getcolor.c
blob: 02ceb8dbf671496e2ec7125d3636c4f614bd79ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>

#include "iup.h"
#include "iupcontrols.h"

void GetColorTest(void)
{
  unsigned char r = 10, g = 100, b = 25;
  if (IupGetColor(100, 100, &r, &g, &b))
    printf("RGB = %d, %d, %d  Hex=[%.2X%.2X%.2X]\n", r, g, b, r, g, b);
}


#ifndef BIG_TEST
int main(int argc, char* argv[])
{
  IupOpen(&argc, &argv);

  GetColorTest();

  IupMainLoop();

  IupClose();

  return EXIT_SUCCESS;
}
#endif