Tray (Value * 0.313)+165

a) (0*0.313)+165 = 165
b) (255*0.313)+165 = 244.8

Since you don't need high accuracy it should work.

Al.