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

**URL:** <https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671>\
**Category:** Questions\
**Created:** [April 26, 2026, 9:09pm UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671 "2026-04-26T21:09:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lpotter](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lpotter](https://cl.desmos.com/u/lpotter)\
**Post date:** [April 26, 2026, 9:09pm UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/1 "2026-04-26T21:09:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Guzman\_Tierno](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/guzman_tierno/32/6149_2.png) [@Guzman\_Tierno](https://cl.desmos.com/u/Guzman_Tierno)\
**Post date:** [April 27, 2026, 10:44am UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/2 "2026-04-27T10:44:24Z")

</div>

like this?

[https://www.desmos.com/calculator/stewowgovu](https://www.desmos.com/calculator/stewowgovu)

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

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [April 27, 2026, 3:09pm UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/3 "2026-04-27T15:09:06Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Michael\_Wiernicki](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/michael_wiernicki/32/221_2.png) [@Michael\_Wiernicki](https://cl.desmos.com/u/Michael_Wiernicki)\
**Post date:** [April 30, 2026, 4:30pm UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/4 "2026-04-30T16:30:07Z")

</div>

This might help.

https://www.desmos.com/calculator/pio9ddbgeb?embed

---

<div class="post-metadata">

**Author:** ![Michael\_Wiernicki](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/michael_wiernicki/32/221_2.png) [@Michael\_Wiernicki](https://cl.desmos.com/u/Michael_Wiernicki)\
**Post date:** [April 30, 2026, 4:32pm UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/5 "2026-04-30T16:32:54Z")

</div>

Hit reply too soon. The point is currently set to turn green when on 3. [Here’s the link to the graph above.](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/4)

Mike

---

<div class="post-metadata">

**Author:** ![Guzman\_Tierno](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/guzman_tierno/32/6149_2.png) [@Guzman\_Tierno](https://cl.desmos.com/u/Guzman_Tierno)\
**Post date:** [April 30, 2026, 9:31pm UTC](https://cl.desmos.com/t/can-points-take-on-different-colors-based-upon-the-value-of-the-x-coordinate/8671/6 "2026-04-30T21:31:24Z")

</div>

or like this:  
[https://www.desmos.com/calculator/ur37wd8mha](https://www.desmos.com/calculator/ur37wd8mha)
