Hi … kindly guide me on how to implement this on my code. My result from my duty are correct but I want to inverse the signal such that when having high value, my output will be low value. Like this

Original result 0-255, but I want to make use of it such that 0 will be 255 and 255 will be 0. How can I implement this please . Thanks