Change background in order/ using values in array

Hey Guys, how do I change the colour of the background in order? Starting from 250, ending at 0 and then looping it? Thanks for your support :slightly_smiling_face: