Desktop Colour Finder. lazarus / 67-Windows ---------------------------------------------------------------------- BobDog · 2020-10-28 18:47 A simple console tool. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program finder; uses windows,crt,sysutils;   const    DC_BRUSH=18;    const  DC_PEN=19; typecolour =packed recordcase integer of0:(r,g,b:byte);1:(c:longword);end;  function Printf(mask : pchar):integer; cdecl; varargs; external 'msvcrt.dll' name 'printf'; function system(s:pchar):integer ; cdecl external 'msvcrt.dll' name 'system'; function SetDCBrushColor(p:hdc;colour:COLORREF): COLORREF; stdcall external 'gdi32.dll' name 'SetDCBrushColor'; function SetDCPenColor(p:hdc;colour:COLORREF): COLORREF; stdcall external 'gdi32.dll' name 'SetDCPenColor'; function SetWindowTheme(p: hwnd; p1: PChar; p2: PChar): integer; external 'UxTheme.dll' Name 'SetWindowTheme';  procedure hidecursor(); var    consoleHandle:handle;     info:CONSOLE_CURSOR_INFO ;     begin     consolehandle := GetStdHandle(STD_OUTPUT_HANDLE);     info.dwSize := 100;     info.bVisible := FALSE ;     SetConsoleCursorInfo(consoleHandle, @info);     End; Varp:hwnd;h,wh:h dc;pt:point;clr:colour;r:integer=50;s:pchar;begin    p := GetConsoleWindow();    setwindowpos(p, HWND_TOPMOST, 100, 100, 200, 280, SWP_SHOWWINDOW);    SetWindowTheme(p,' ',' ');    system('title [MOVE]');  SetWindowLong(p,GWL_STYLE, GetWindowLong(p, GWL_STYLE) and not(WS_MAXIMIZEBOX) and not( WS_SIZEBOX));    hidecursor();    h:=GetDC(0);    wh:=GetDC(p);    SelectObject(wh,GetStockObject(DC_BRUSH));    SelectObject(wh,GetStockObject(DC_PEN));    while p<>1 do    begin    getcursorpos(@pt);    clr.c:=getpixel(h,pt.x,pt.y);    ShowScrollBar(p, SB_BOTH, FALSE);    SetDCBrushColor(wh,clr.c);    Set DCPenColor(wh,clr.c); ellipse(wh,trunc(95-r),trunc(70- r),trunc(95+r),trunc(70+r));   gotoxy(3,10);  printf('Red   %s','   ');  gotoxy(3,10);  printf('Red   %d',clr.r);   gotoxy(3,11);  printf('Green %s','   ');  gotoxy(3,11);  printf('Green %d',clr.g);   gotoxy(3,12);  printf('Blue  %s','   ');  gotoxy(3,12);  printf('Blue  %d',clr.b);   gotoxy(3,13);  printf('HEX   %s','          ');  gotoxy(3,13);  s:=pchar(IntToHex(clr.c,8));  printf('HEX  %s',' $');  printf('%s',s);   gotoxy(3,14);  printf('RAW   %s','          ');  gotoxy(3,14);  printf('RAW   %d',clr.c);   gotoxy(3,15);  printf('X,Y %s','             ');  gotoxy(3,15);  printf('X,Y   %d ,%s %d',pt.x,'',pt.y);    sleep(20);    end; end.  Tested 64 bit fpc Win 10. Auld Lang Syne