EnableExplicit Define EventID Define CursorPos.POINT Define Color Define hDC CreateImage(1,20,20,32) If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) TextGadget(1,40,10,400,100,"",0) Repeat EventID=WaitWindowEvent(10) GetCursorPos_(@CursorPos.POINT) hDC = GetDC_(0) Color = GetPixel_(hDC,CursorPos\x,CursorPos\y) ReleaseDC_(0, hDC) SetGadgetText(1,"Rot: "+Str(Red(Color))+Chr(13)+"Grün: "+Str(Green(Color))+Chr(13)+"Blau: "+Str(Blue(Color))) StartDrawing(WindowOutput(0)) Box(10,10,20,20,Color) StopDrawing() Until EventID = #PB_Event_CloseWindow EndIf