dim entire displayGroup

Is there an easy way to dim a displayGroup?   I see o.alpha adjusts the opacity.  But what if you want to dim the DG to a percentage of black?   I am looking for something like alpha but for dimness instead of transparentness. 

I realize I could define a rectangle the size of the DG and place it over the group at .7 alpha.  But I thought I would ask if there is an easier way before I invented my own.  

There is no dim concept.

The best you can do is overlay the group with a rectangle, make the rectangle black, then set the rectangle’s opacity (alpha) to less than 1.

thanks

local dimDG = function (group , amount , transtime )

local DVCH   = display.viewableContentHeight

local DVCW   = display.viewableContentWidth

local overlay = display.newRect(group, 0,0,DVCW, DVCH)

local L_transtime = 500 or transtime

local L_amount = .7 or amount 

overlay.alpha = 0   – start transparent and fade darker. 

overlay:setFillColor (0,0,0)   – black

overlay.anchorX = 0 

overlay.anchorY = 0 

group.overlay = overlay

transition.to(group.overlay, {time=L_transtime, alpha = L_amount , transition = easing.inExpo   } )

return

end

There is no dim concept.

The best you can do is overlay the group with a rectangle, make the rectangle black, then set the rectangle’s opacity (alpha) to less than 1.

thanks

local dimDG = function (group , amount , transtime )

local DVCH   = display.viewableContentHeight

local DVCW   = display.viewableContentWidth

local overlay = display.newRect(group, 0,0,DVCW, DVCH)

local L_transtime = 500 or transtime

local L_amount = .7 or amount 

overlay.alpha = 0   – start transparent and fade darker. 

overlay:setFillColor (0,0,0)   – black

overlay.anchorX = 0 

overlay.anchorY = 0 

group.overlay = overlay

transition.to(group.overlay, {time=L_transtime, alpha = L_amount , transition = easing.inExpo   } )

return

end