map weights to grayscale values