Main content
Computer programming
Quick tip: color picking
In the last talk-through, we explored how to use the color picker to easily find a color. Since you can't see the color picker in action in our talk-throughs, here's a GIF of it being used:
Click anywhere in the numbers to get the color picker to pop up. Then, click on the right hand color bar to change the general color you're picking, and click in the left hand side to change the lightness/brightness of the color. You'll get to try it in the next challenge!
Want to join the conversation?
- Shouldn't the basic colors be red, yellow, and blue? I thought the basic colors can't be mixed from other colors. Green can be mixed from yellow and blue, is
it different in computers?(88 votes)- I don't really know how it works, but I know that in computers, it's green, blue, and red. If you look very closely at a TV, you can small rectangles that are red, black, blue, and green.(6 votes)
- Why do you put the fill command before the shape command? Wouldn't you just be filling in nothing?(1 vote)
- actually, that's the exact opposite that happens, then you need to put another fill() command to change it back to whatever color it was(4 votes)
- If I use Sublime for practice all the thing I am learning here, in which format I need to save the document ? it is JS the extension for java? Thanks!!(2 votes)
- Java and Javascript are two entirely different things. The syntax between the two are not even lose to each other. Java would be closer to C# and JavaScript is kind of its own specialty but if i'm wrong please tell me.(15 votes)
- Does anyone know why three main colors are red, green, and blue instead of the three primary colors(red, yellow, and blue)?(1 vote)
- Red, green, and blue are used because they are called "additive colors." This means that when they are added together, they create white light. When they are subtracted from each other, they create black light. White light and black light can only be created by these colors.(50 votes)
- how does one make the program constantly change colors(16 votes)
- I found that if you use this as a fill in SOME cases it will appear as a rainbow changing effect
THE CODE
fill(random(255),random(255),random(255));
MY PROJECT AND HOW IT WORKED
https://www.khanacademy.org/computer-programming/confetti-party-spin-off-of-project-make-it-rain/6453509001003008(2 votes)
- Can you make any color you want?(1 vote)
- Different color displays (RGB, CMYK, etc.) display different ranges of colors. Compared to the amount of a colors a computer can display, RGB has a pretty small range.(4 votes)
- Can you mix 2 colors(1 vote)
- That is exactly what those numbers are for(2 votes)
- can we make a man with these shapes(5 votes)
- Yes, you can make anything if you work hard enough.(2 votes)
- To someone who just started this course in 2021 do you think it will be of any use five years later with the way programming is evolving right now?(3 votes)
- JavaScript has slowly been evolving over the past years and right now is very much an alive and used coding language, so I would assume that it would be used in the future.(4 votes)
- Uh Hi, so the “fill” comes before the ellipse right?
Ok so if you want to color the circle or the ellipse yes you will do that but if there is still shapes under the ellipse like rect or triangle they will get colored too(4 votes)- but then you put fill before the triangle or the rect(2 votes)