Overwrite the pixels closest to blue with (0,0,255) blue
问题 I'm using Python and PIL (or Pillow) and want to run code on files that contain two pixels of a given intensity and RGB code (0,0,255). The pixels may also be close to (0,0,255) but slightly adjusted ie (0,1,255). I'd like to overwrite the two pixels closest to (0,0,255) with (0,0,255). Is this possible? If so, how? Here's an example image , here zoomed with the pixels I want to make "more blue" here The attempt at code I'm looking at comes from here: # import the necessary packages import