Retrieve and oject's color

0 favourites
From the Asset Store
HSV RGB Color Picker and Converter for Construct 3
  • Have you seen the official template for this?

    https://editor.construct.net/#open=camera-average-color

  • Have you seen the official template for this?

    https://editor.construct.net/#open=camera-average-color

    Yes, I saw this template but it is script based but I don't know coding so looking for normal solution in Construct 3 I could get the same results through events and actions.

  • Here is a demo, one pixel is read from the center of the image:

    dropbox.com/s/oduicvl97l4v0le/Cameratest.c3p

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here is a demo, one pixel is read from the center of the image:

    https://www.dropbox.com/s/oduicvl97l4v0le/Cameratest.c3p?dl=0

    Thanks DOP for sharing this link. It is helpful. But I noticed it gives a random RBG value. How can i find out that if a specific color is in screen. For example, if suddenly red color appears in my screen, It should be able to tell me red color is detected...can i get rgb value based on my requirement instead of screenshot taking and random value?

    Sorry for these many question ..but I see a ray of hope in your answer so I am asking ..thanks a lot in advance.

  • But I noticed it gives a random RBG value.

    It is not random! It's RGB value from the pixel in the center. It may not be accurate because of the camera noise etc. So if you need better detection, you have to calculate an average color for an area of pixels.

    You can take snapshots constantly, but you still have to wait for snapshot to finish. Saving a snapshot is not a fast operation, especially on large camera image. So you may not be able to detect moving objects with this method.

    And if you need to detect a red object anywhere on the screen, this will be nearly impossible to make with events. I suggest you look for some JS library.

  • > But I noticed it gives a random RBG value.

    It is not random! It's RGB value from the pixel in the center. It may not be accurate because of the camera noise etc. So if you need better detection, you have to calculate an average color for an area of pixels.

    You can take snapshots constantly, but you still have to wait for snapshot to finish. Saving a snapshot is not a fast operation, especially on large camera image. So you may not be able to detect moving objects with this method.

    And if you need to detect a red object anywhere on the screen, this will be nearly impossible to make with events. I suggest you look for some JS library.

    Thanks DOP

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)