the $capture will grab properties from the current commandline destination:
you need to utilize the ChangeDestination command (CD) and the open end macroline (@)
CD @
$capture
CD /
this will put CD in the commandline and wait for you to complete the syntax.
when you tap on Preset 4.2 the commandline will be executed as
CD Preset 4.2
and the commandline destination is changed to
Presets/Global/Color 4/Preset 4.2/
which the Lua script can detect and extract information from via the intellivar
$capture
then you change the destination back to Root with
CD /