Corrected the hex to grayscale calculation