# Animate color of standardMaterial

**URL:** <https://forum.babylonjs.com/t/animate-color-of-standardmaterial/7132>\
**Category:** Bugs\
**Created:** [November 21, 2019, 1:15pm UTC](https://forum.babylonjs.com/t/animate-color-of-standardmaterial/7132 "2019-11-21T13:15:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [November 21, 2019, 2:01pm UTC](https://forum.babylonjs.com/t/animate-color-of-standardmaterial/7132/4 "2019-11-21T14:01:49Z")

</div>

My pleasure. Just for fun… [https://www.babylonjs-playground.com/#Y4DSFZ#2](https://www.babylonjs-playground.com/#Y4DSFZ#2)

I changed the light… hemisphericLight is better for general playing, cuz it lights all sides of mesh, and with it’s groundColor option, it lets you set belly-color differently than hemi.diffuse (light.diffuse).

I temporarily turned off your previous animation (by disabling line 57)… and then installed a “shortcut” animation method… in lines 60-76.

Then in line 79, I showed how to make it even shorter, but I left that line disabled.

And then in lines 82-83, I used that shortcut method… to animate the y-axis rotation (using the same _speed_ and _totalFrames_ as the color animation uses).

Notice that when using CreateAndStartAnimation() method… we don’t need to tell the animation system that we are animating a BABYLON.Animation.ANIMATIONTYPE\_COLOR3 data-type. CreateAndStartAnimation() automatically “senses” the animated dataType FOR US! Cool, huh?

In line 83, where we animate a vector3 instead of a color3, we didn’t need to specify that. It sensed it.

I’m just showing you some other fun ways to animate. I hope I’ve been helpful. Be well.

---

_[View the full topic](https://forum.babylonjs.com/t/animate-color-of-standardmaterial/7132)._
