Anonymous user
Color of a screen pixel: Difference between revisions
alphabetized
(alphabetized) |
|||
Line 46:
=={{header|PureBasic}}==
Return the color used at the x,y position in the current output. If the current output has an alpha channel then the result will be a 32bit RGBA value, otherwise it will be a 24bit RGB value. The color can be split in their RGB and alpha values by using the Red(), Green(), Blue() and Alpha() functions.
Line 56 ⟶ 55:
Color = GetPixel_(hDC, x, y)
ReleaseDC_(0, hDC)</lang>
=={{header|Python}}==▼
<lang python>from PIL import ImageGrab▼
pixels = ImageGrab.grab().load()▼
print pixels[0,0]</lang>▼
=={{header|Tcl}}==
Line 84 ⟶ 88:
=={{header|TI-89 BASIC}}==
Only the graph screen can be read.
<lang ti89b>pxlTest(y, x) © returns boolean</lang>
{{omit from|R}}
▲=={{header|Python}}==
▲from PIL import ImageGrab
▲pixels = ImageGrab.grab().load()
▲print pixels[0,0]
{{omit from|PHP}}
|