if you just want to change the mid tone of a picture, photoshop offer an option in color range command. as the picture below, but this method is not that accurate.
But if I want to select more or less, this way wont be that accurate. so I use this method to achieve this goal
1 make a new layer and filled with 50% gray, change the blending mode to difference.
we know the new pixel value y=|a-b|, once you use difference mode, the white and black both changed to gray. and the mid gray will be 0.
2 click channels, make a copy of green channel, ctrl+i invert the green copy
3 ctrl+L to load the levels adjustment, move the black slidder toward the middle point
4 by moving the the new mid point slidder, you can get different mid tone selection. make sure the darkest slidder starts from 127
4 click OK then CTRL click this channel to load the selection. go back to layer pannel, turn off the gray layer, the selection is there.
5 if you just want to get the selection of highlights and shadow, don't invert channel copy in step 2.