While I'd agree with pretty much everyone else, you can do some interesting things not just with color, but with contrast:


A lower level of contrast will cause elements to appear faded away, much like graying out would do with black on white backgrounds. In my opinion, this makes the UI element appear out of focus. Bear in mind this solution may not be the most accessible, which is why you may need to consider the use of themes.
Additionally, you can consider hiding the element altogether. As far as UX goes, this can help reduce the cognitive load of your users, helping them to be more productive with you app. Beware that there can be drawbacks if implemented poorly. I've seen some apps that make content reappear too late and this is quite jarring.
You can learn more about the second approach by reading up on The Motion Guide for Material Design