How can I colour my graph by size?

I’m using a vega lite api and trying to color all my circles in the graph by size?

     if(planet.size <= size)
        vl color blue

Etc. Do this cases to use different colours depending on the sizes.
I used


But this puts a lot of different colors