i might be misunderstanding  but this is just a clamp  and not an affine transformation  originally  i had code like this  but i was told by clint that this was undesirable as once uesrspace starts requesting values lower than low threshold  the backlight never changes  in other words  you have to dim times after you hit the low threshold before you get to black  what vijay recommended in the email earlier in the day does exactly this  as i said there  i think my solution is better  whatever you guys want is fine with me though 