CSS Worksheet: Hex and RGB Colours
Code tip (Red, green, blue): rgb(red, green, blue): each from 0 to 255. #rrggbb: the same three numbers in hex. Hex digits: 0–9, then a = 10, b = 11, c = 12, d = 13, e = 14, f = 15. A pair = 16 × first digit + second digit: ff = 16 × 15 + 15 = 255.
NameDateTime takenScore ___ / 40
- 1.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #00ffff
- 2.🌈 Which colour of light is strongest in rgb(49, 60, 162)? (a) red (b) green (c) blue
- 3.🌈 In #001d00 the green part is the hex number 1d. What is it as a normal number?
- 4.🌈 Which colour of light is strongest in rgb(5, 89, 236)? (a) blue (b) red (c) green
- 5.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 6.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) white (d) bright green
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 8.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
- 9.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
- 10.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
- 11.🌈 Which colour is #ff00ff? (a) black (b) yellow (c) blue (d) magenta
- 12.🌈 Which colour is #00ff00? (a) bright green (b) black (c) magenta (d) cyan
- 13.🌈 Which colour of light is strongest in rgb(21, 205, 102)? (a) blue (b) red (c) green
- 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) white (d) cyan
- 15.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #ff0000
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 17.🌈 Which colour is #ffffff? (a) blue (b) cyan (c) magenta (d) white
- 18.🌈 Which colour of light is strongest in rgb(164, 20, 90)? (a) blue (b) red (c) green
- 19.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #ff00ff (d) #0000ff
- 20.🌈 In #f90000 the red part is the hex number f9. What is it as a normal number?
- 21.🌈 Which colour is #ff0000? (a) white (b) black (c) magenta (d) red
- 22.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 23.🌈 Which colour is #000000? (a) magenta (b) black (c) red (d) yellow
- 24.🌈 Which colour of light is strongest in rgb(85, 5, 191)? (a) blue (b) red (c) green
- 25.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
- 26.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) red (c) bright green (d) black
- 27.🌈 Which colour is #00ffff? (a) white (b) bright green (c) yellow (d) cyan
- 28.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 29.🌈 Which colour of light is strongest in rgb(131, 80, 206)? (a) blue (b) red (c) green
- 30.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) magenta (d) red
- 31.🌈 Which colour of light is strongest in rgb(105, 235, 9)? (a) green (b) blue (c) red
- 32.🌈 Which colour of light is strongest in rgb(40, 79, 155)? (a) blue (b) green (c) red
- 33.🌈 Which colour of light is strongest in rgb(73, 219, 46)? (a) red (b) green (c) blue
- 34.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 35.🌈 Which colour of light is strongest in rgb(54, 158, 0)? (a) blue (b) green (c) red
- 36.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 37.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
- 38.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #ff0000
- 39.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
- 40.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
Answer key
- #00ffff
- blue
- 29
- blue
- #ff00ff
- red
- F
- 10
- 167
- 25
- magenta
- bright green
- green
- blue
- #00ff00
- blue
- white
- red
- #0000ff
- 249
- red
- 169
- black
- blue
- 72
- bright green
- cyan
- red
- blue
- white
- green
- blue
- green
- 255
- green
- 3
- 16
- #ffffff
- 93
- 18
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids