DX11 get darkest pixel from a given texture

two ways to acess readwrite buffer is compute or pixel shader.
but the concept is easy(dunno if u need buffer for that): store pixel to temporary value, check if color darker then stored one, rewrite.