FAQ: Welcome to Codecademy! - Changing colors

Just curious how the formulas for defining colors are made up? Is blending Possible within the color code?

what if I want half of the message in red color, and the rest in orange? how can I do this?

You could limit your list of available colors to red and orange; however, I think the dot colors are chosen at random so you will have a mix of colors, not a red segment and an orange segment.

How do we get color code?

what are that number in side that brackit

Okay, I am not understanding anything atall

changing color in javascript

What the deal with the number? I tried adding pink and I put some random numbers and it didn’t show up.

so here do we have to declare our color variables first before we assign values to them because I tried introducing a new but it didn’t change.

The numbers are explained by mtf in his previous post.

Random numbers probably won’t get you pink—I’d estimate that an input of three random numbers will result in a shade of pink at a probability rate of about 0.05 or thereabouts. Try the values [322, 57, 77] for a soft, dim pink.

A slight error in grammar adds confusion to instructions. A semicolon rather than a comma after “parentheses” might be a better choice.

In the code editor, drawName() now has two items between the parentheses, message , and red.

Would instead be

In the code editor, drawName() now has two items between the parentheses; message and red .

Hey, wondering what the numbers mean behind the color names? I thought they’d be different shades of that color but when I enter a number, I get an error message. Can someone enlighten me? :slight_smile:

HSL Means:

Hue

Saturation
&
Lightness

So you can tweak it to your liking.

You can get more information about this here.

https://www.w3.org/wiki/CSS/Properties/color/HSL

Happy Coding!

How can i add other colors in the text except red, orange, green, blue and purple ? I tried defining another color but can’t get that color.

2 questions:

  1. Can you put the color before the message?
    [No–you have to call the function, and then the value]
  2. Can the message be on line 1 and then the colors?

Thank you for all of your help. :grinning: