CodeHS tests assignments using an automated grading suite. If your visual output looks correct but fails the autograder, double-check that you did not hardcode values that were supposed to be dynamic variables (like using Color.red instead of creating an explicit new Color(255, 0, 0) object).
You want to draw a white rectangle. What RGB parameters do you pass? Best Answer: rgb(255, 255, 255)
These are the pure colors: only one light turned on at max, the others turned off.
If your code is throwing an error or failing the grading test cases, check for these common pitfalls: exploring rgb color codes codehs answers best
Start with white (255, 255, 255) and lower the channels of the colors you want to de-emphasize. Beware of Hexadecimal vs. Decimal Coding
Exploring RGB color codes on CodeHS is much more than just an assignment. It's a journey into the very language that digital screens use to paint our world. By understanding the relationship between numbers and colors, you're learning fundamental concepts of data encoding, problem-solving, and computational thinking that extend far beyond any single exercise.
Some advanced CodeHS lessons introduce Hexadecimal codes (e.g., #FF0000 ). Hex codes are simply a base-16 representation of RGB. The first two characters represent ( FF = 255). The middle two represent Green ( 00 = 0). The last two represent Blue ( 00 = 0). CodeHS tests assignments using an automated grading suite
More advanced modules, especially those covering image manipulation or nested for loops, ask you to modify the pixels of an image or draw a gradient background.
To succeed in this exercise, students must apply these key principles: Pennsylvania Tech Apps and Coding - Explore - CodeHS
// This program creates a rectangle and changes its color // to demonstrate RGB mixing. What RGB parameters do you pass
// JavaScript (CodeHS Karel/Graphics environment) var myColor = new Color(r, g, b); Use code with caution.
To make a color darker, lower all the numbers proportionally. To make it lighter (pastel), increase the numbers toward 255. For example, a dark "Navy" blue might be rgb(0, 0, 128) , while a "Sky" blue might be rgb(135, 206, 235) . 3. Use Color Pickers