This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Animate Your Name Forum

View Course

141 points
1027c446218178fe11dae425d8919fbb?s=140&d=retro
Submitted by
Xinxi_5060cf0c3386a400020d9f9f_delet
about 2 years ago

[resolved] How can I define specific colors for certain letters in this animation?

I'd love to have all consonants in ordinary black, but the vowels (a, e, i, etc.) in specific colors (e.g. a = yellow, e = red, etc.).
How do I have to tweak this code to do that?


1 vote

permalink

Hi Xinxi,

That isn't a feature of this code, What you can do is, in your letterColors, put the colours in the order that you'd like to see them. You can repeat the same colour as many times as you like.

3691 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
about 2 years ago

2 Comments

1027c446218178fe11dae425d8919fbb?s=140&d=retro Xinxi_5060cf0c3386a400020d9f9f_delet about 2 years ago

Smart solution, thx! I just had tried to program something similar but couldn't find a solution. Because n00biness.

55df2afa95e3787b9200005e_359368177 Judy about 2 years ago

Sometimes you just have to poke around at things to see how they work!