colorSample

Type Event
Revision Release 2022.3683
Keywords colorSample

Overview

Provides information about the colorSample that generated this event.

Properties

Example

-- Called when a colorSample event has been received
local function onColorSampleEvent( event )
    print( "Sampling result, at position: " .. event.x .. " " .. event.y .. " The color is: " .. event.r .. " " .. event.g .. " " .. event.b .. " " .. event.a )
end
                             
display.colorSample( 17, 9, onColorSampleEvent )