RGB White channel setting

I need to crete a filter that set gbr color only for white (and neighbors) pixels
I’m working with bgr Mat
Below attach screen taken from an software utility for explain better the goal

I read some documentation and think the approach is to identify pixel in range of “white and neighbors” and then add to these pixel a delta value (for each color indipendently)

Could you someone give me the right chain of filters or transformations to apply to achieve this.

Thanks in advanced.