Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Find color in pixel.

Find color in pixel.

Scheduled Pinned Locked Moved C#
tutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jafingi
    wrote on last edited by
    #1

    Hi, I got a code where I move the mouse around the screen... Everytime the mouse moves a pixel, i have an action. In that action, i want to find the color of the pixel there are in the screen position: 395,247... Just need the color in HEX (#xxxxxx) or RGB (xxx,xxx,xxx). Can anyone make an example for me to do that? Thanks.

    K 1 Reply Last reply
    0
    • J jafingi

      Hi, I got a code where I move the mouse around the screen... Everytime the mouse moves a pixel, i have an action. In that action, i want to find the color of the pixel there are in the screen position: 395,247... Just need the color in HEX (#xxxxxx) or RGB (xxx,xxx,xxx). Can anyone make an example for me to do that? Thanks.

      K Offline
      K Offline
      Kristian Sixhoj
      wrote on last edited by
      #2

      The GetPixel function should be able to do that. http://www.pinvoke.net/default.aspx/gdi32/GetPixel.html[^]

      Kristian Sixhoej


      "Failure is not an option" - Gene Kranz

      J 1 Reply Last reply
      0
      • K Kristian Sixhoj

        The GetPixel function should be able to do that. http://www.pinvoke.net/default.aspx/gdi32/GetPixel.html[^]

        Kristian Sixhoej


        "Failure is not an option" - Gene Kranz

        J Offline
        J Offline
        jafingi
        wrote on last edited by
        #3

        Thanks :) works perfect..

        K 1 Reply Last reply
        0
        • J jafingi

          Thanks :) works perfect..

          K Offline
          K Offline
          Kristian Sixhoj
          wrote on last edited by
          #4

          You're welcome :)

          Kristian Sixhoej


          "Failure is not an option" - Gene Kranz

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups