The Question: "If Red=255, Green=100, Blue=0, what color family is this?"
The best way to learn is to code. In the CodeHS Sandbox, you will often be asked to create a program that displays your favorite color or a gradient.
The Assignment: "Create a circle. Use RGB values to change its color from Blue to Purple."
The Best Solution (JavaScript/Graphics):
// This is the standard CodeHS solution var circle = new Circle(50); circle.setPosition(200, 200);// Starting Blue circle.setColor("rgb(0, 0, 255)"); add(circle); exploring rgb color codes codehs answers best
// To make it purple, we add Red while keeping Blue high. // Ideal Purple: Red 128, Green 0, Blue 128 circle.setColor("rgb(128, 0, 128)");
Digital RGB is typically expressed in one of three formats:
The system is additive: starting from black (0,0,0), adding light increases brightness; full intensity on all channels (255,255,255) yields white. Intermediate combinations create secondary colors (e.g., red + green = yellow). The Question: "If Red=255, Green=100, Blue=0, what color
Question: Which RGB value produces a dark green color?
A) (0, 255, 0)
B) (0, 100, 0)
C) (100, 255, 100)
D) (0, 0, 255)
Best answer: B – (0, 100, 0) is dark green because green is moderate (100) and red/blue are zero.
Before diving into the specific CodeHS answers, it is important to understand the concept. RGB stands for Red, Green, and Blue. Digital RGB is typically expressed in one of three formats:
Computer screens create colors by mixing these three "primary" colors of light.
The Logic:
You will often be asked to predict the color based on the numbers. Here is a cheat sheet:
| RGB Code | Resulting Color | Explanation |
| :--- | :--- | :--- |
| 255, 0, 0 | Red | Full Red, no others. |
| 0, 255, 0 | Green | Full Green, no others. |
| 0, 0, 255 | Blue | Full Blue, no others. |
| 255, 255, 0 | Yellow | Red + Green = Yellow. |
| 0, 255, 255 | Cyan | Green + Blue = Cyan. |
| 255, 0, 255 | Magenta | Red + Blue = Magenta. |
| 255, 165, 0 | Orange | High Red, medium Green. |
| 128, 128, 128 | Gray | Equal values of all three. |
Memorizing answers is not the "Best" way to succeed. The CodeHS autograder checks for exact specific output or image rendering. Use these strategies to ensure you get 100% every time.