#!/usr/bin/perl use strict; use warnings 'all'; use Win32::GUI; # create screen object my $screen = Win32::GUI::DC -> new ("DISPLAY"); # get color of pixel at x, y my($x, $y) = (100, 50); my $color = $screen -> GetPixel ($x, $y); # print out the color printf("Color at %i, %i: 0x%X\n", $x, $y, $color);