athbn Posted April 22, 2008 Posted April 22, 2008 i want to simple get the color of red(rgb) of a pixel of my monitor... i mean from the rgb only the r is needed then to put that in a variable is there any function which can solve my problem? i looked in the help file but i only got this one "_ColorGetRed" which i think it may do the job but i don't know how thnx
someone Posted April 22, 2008 Posted April 22, 2008 (edited) i looked in the help file but i only got this one "_ColorGetRed"which i think it may do the job but i don't know howthnxJust search for pixelEDIT: I'm having idiot moments today... Edited April 22, 2008 by someone While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd
weaponx Posted April 22, 2008 Posted April 22, 2008 $result = PixelGetColor(x,y) $red = BitAND( BitShift($result, 16), 0xff) $green = BitAND( BitShift($nColor, 8), 0xff) $blue = BitAND($nColor, 0xff) MsgBox(0,"","Red: " & $red & " Green: " & $green & " Blue: " & $blue)
MystikSpiral Posted December 15, 2012 Posted December 15, 2012 (edited) ^ Nearly worked for me, though needed a little correctionDim $result Dim $red Dim $green Dim $blue $result = PixelGetColor($x,$y) $red = BitAND( BitShift($result, 16), 0xff) $green = BitAND( BitShift($result, 8), 0xff) $blue = BitAND($result, 0xff)So happy this worked Saved me so much time over trying to figure out html color code tables. Edited December 15, 2012 by MystikSpiral
Moderators JLogan3o13 Posted December 15, 2012 Moderators Posted December 15, 2012 Why drag up a thread 4 1/2 years dead just to tell everyone it worked for you?! "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Bert Posted December 15, 2012 Posted December 15, 2012 agreed. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Moderators Melba23 Posted December 15, 2012 Moderators Posted December 15, 2012 MystikSpiral,Please do NOT necro-post like this again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts