This is how it's set in the default stylesheet:
.selector("core") // just core properties
.css({
"selection-box-color": "#ddd",
"selection-box-opacity": 0.65,
"selection-box-border-color": "#aaa",
"selection-box-border-width": 1,
"panning-cursor": "grabbing",
"active-bg-color": "black",
"active-bg-opacity": 0.15,
"active-bg-size": isTouch ? 40 : 15
})
However, this is for the core (the graph, the set of nodes and edges in an instance, etc).
It seems you are describing the active state. Just as in HTML+CSS, you use the :active selector to indicate state and then the properties to specify the details of the style, e.g.:
.selector(":active")
.css({
"overlay-color": "black",
"overlay-padding": 10,
"overlay-opacity": 0.25 // and others… if the dev wants
})