Light Sensor and LED Problem - LilyPad

It would make approximately -750, so I divided lightval by 4 before calculating brightness, which I expected to give me the right outcome, but the outcome stayed the same.

If the input from the light sensor is 1007, does that mean, there is much light? Because then the calculation would be like following:

lightval = 1007 / 4 = 252
brightness = 255 - 252 = 3

Which would mean, that the brightness gets lower while the input gets higher, but the brightness instead decreases, when the input decreases.