Python 3, 72 7070 68 bytes
lambda x:'#'+''.join(f"{round(int(x[i:i+2],16)+8)//17):X}"for i in(1,3,5)) This is a port of Grzegorz Oledzkis original answer, which I helped him golfing down.
Two features of Python 3 help us save bytes:
- Floating point division by default
- Format string literals
-2 bytes thanx to Jonathan Allan