#include main(argc, argv) char **argv; { Display *dpy; Frame frame; xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL); frame = xv_create(NULL, FRAME); dpy = (Display *)xv_get(frame, XV_DISPLAY); if (DefaultDepth(dpy, DefaultScreen(dpy) ) < 2) { printf("B/W display\n"); } else { printf("color display\n"); } }