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

Animate Your Name Forum

View Course » View Exercise

1330 points
535588e87c82cac5180016ac_64431017
Submitted by
Mike K.
over 3 years ago

[resolved] How can I put more colors so that my name can be even more colourful?

hi,

How can I put more colors so that my name can be even more colourful? How do I define them? For example, I want to have brown, silver, gold, yellow and black into my name.


4 votes

Best answer

permalink

Well, I found what my mistake was. I had put quotes around the colors defined in the letterColors array. So I fixed it and that's what my new code looks like:

var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];
var yellow = [255, 255, 0];
var black = [0, 0, 0];
var brown = [165, 42, 42];
var silver = [192, 192, 192];
var gold = [255, 215, 0];

if(15 > 5) {
bubbleShape = "circle";
} else {
bubbleShape = "square";
}

var myName = "Mike K.";
var letterColors = [red, blue, yellow,
orange, black, purple, green, brown, silver, gold];

drawName(myName, letterColors);
bounceBubbles();

1330 points
535588e87c82cac5180016ac_64431017
Submitted by
Mike K.
over 3 years ago

3 Comments

5626bdffd3292f5c6d000451_412320747 Avery over 3 years ago

Cool!

52d88a457c82ca39a90023c4_235234977 NeonStardust over 3 years ago

I didn't see that XD good job!

535588e87c82cac5180016ac_64431017 Mike K. over 3 years ago

thanks


1 vote

permalink

That's what I did NeonStardust but it doesn't get it correct.
var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];
var yellow = [255, 255, 0];
var black = [0, 0, 0];
var brown = [165, 42, 42];
var silver = [192, 192, 192];
var gold = [255, 215, 0];

var myName = "Mike K.";
var letterColors = ["red", "blue", "yellow",
"orange", "black", "purple", "green", "brown", "silver", "gold"];

drawName(myName, letterColors);

1330 points
535588e87c82cac5180016ac_64431017
Submitted by
Mike K.
over 3 years ago

1 Comment

52d88a457c82ca39a90023c4_235234977 NeonStardust over 3 years ago

Try using an art program to find the colors? If not i don't know.


1 vote

permalink

did you do lettercolor iam stuck

9 points
Picture
Submitted by
Eiran-m Deberry
over 3 years ago

3 Comments

52d88a457c82ca39a90023c4_235234977 NeonStardust over 3 years ago

With what? If you are stuck with letterColors you have to have the capital C

9bba2ee872b1c7565dd87cc1169f6411?s=140&d=retro sirjawalt over 3 years ago

^%$#^#^#$%^%&^%$$^@^%$#^%$&^%&$%&$@^%&%^^%(&(^^%&^(&^%&^&&&$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $%#@^#%^&)(&%^&^(&^%$#$%^%$$%&(&^%$&&&^&^&(+)(*&^%&^^&^^%%^&&^%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

9bba2ee872b1c7565dd87cc1169f6411?s=140&d=retro sirjawalt over 3 years ago

sorry sorry ijustcould nothelpmyself imthecrazyone ffffssssssssssssssssststst!!!!!!!!!!!!


1 vote

permalink

DO NOT TRY, I TRIED AND GOLD was black and silver was white!!!!!!!!

I just want to say that you will feel like you will want to say:
!@#%^()(()&%$#~!@$%^&^&%$##$%^%^#@~!@#&&(&^%$(&^%$#$%^()(&^%,&&^%^&^%&^%^&^&^%%$^%^%^%^%&^*

19 points
9bba2ee872b1c7565dd87cc1169f6411?s=140&d=retro
Submitted by
sirjawalt
over 3 years ago

1 Comment

9bba2ee872b1c7565dd87cc1169f6411?s=140&d=retro sirjawalt over 3 years ago

^%$%^%%%^^&))(&^%$###$%^&()(&^##^^&^%^#@#$%^^^(&&^%_)&&&(&&&&^%%%&&&%#$%^&&((((((()(*&^&()^^$%#%$^&&%&$%#%$^%^&&!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


0 votes

permalink

You can't use those colors. Don't worry, I need help with that too.

26 points
530bb47f52f8634de1000224_31898068
Submitted by
Myler621
over 3 years ago

1 Comment

9bba2ee872b1c7565dd87cc1169f6411?s=140&d=retro sirjawalt over 3 years ago

ya ,would you help me ,please, or should I say,:peeeeeeeaaaaaas ,..., and carrots


0 votes

permalink

You CAN put those colors but you need to make a new variable with the correct numbers to make the color

21 points
52d88a457c82ca39a90023c4_235234977
Submitted by
NeonStardust
over 3 years ago

1 Comment

52d88a457c82ca39a90023c4_235234977 NeonStardust over 3 years ago

Example:
var black = [0, 0, 0];