Can points take on different colors based upon the value of the x-coordinate?

I would like to have a draggable points change colors based upon the x-coordinate. That way when students drag them in an amplify activity, they will know when they have dragged them to the correct location on the number line. Is this possible?

like this?

https://www.desmos.com/calculator/stewowgovu

in Desmos 3D you can also use functions for colors:
https://www.desmos.com/3d/ihdnbhsrrx

@Guzman_Tierno 's solution calculates based on position, but you may want to be more specific about how you want the color to change. If you just want one color, but change it when it’s correct, you can use a simple conditional. There is certainly a lot you can do with color, but the main thing to know is that the dynamic color needs to be defined and have a variable name. It’ll then show up in the color list to select from.