There is nothing wrong with the code,
though you perform a for loop over 255 colors, the last one is 255.
then it exits the loop and the color remaining is 255 ( = white).
the framerate is slow so only the last one will be shown.
(let x = 0; x < 130; x++) { <-- would give a grey background