AP Computer Science Unit 1 – Test Review Practice Questions

Access More Questions
A common use of hexadecimal numerals is to specify colors on web pages. Every color has a red, green, and blue component. In decimal notation, these are denoted with an ordered triple (x, y, z), where x, y, and z are the three components, each an int from 0 to 255. For example, a certain shade of red, whose red, green, and blue components are 238, 9, and 63, is represented as (238, 9, 63). In hexadecimal, a color is represented in the format #RRGGBB, where RR, GG, and BB are hex values for the red, green, and blue. Using this notation, the color (14, 20, 255) would be coded as #RRGGBB. Which of the following hex codes represents the color (14, 20, 255)?
Correct Answer:
#0E14FF
Explanation:
Correct answer: #0E14FF

Access more questions from this quiz

Continue to AP Computer Science Unit 1 – Test Review Practice Questions for more practice questions and the full quiz experience.

Access More Questions