In that case the direct equivalent in G’MIC is probably the “Curves” filter in HSV mode, then tweak the value channel. A more automated rough equivalent might be (at command line) :
gmic img1.png img2.png rgb2hsv8 sh 2 balance_gamma. {ia#-2} rm[-2,-1] hsv82rgb