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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 2.🌈 Which colour is #ffff00? (a) white (b) yellow (c) bright green (d) black
- 3.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) cyan (d) red
- 4.🌈 Which colour is #ff0000? (a) yellow (b) blue (c) red (d) black
- 5.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 7.🌈 Which colour of light is strongest in rgb(205, 13, 91)? (a) red (b) blue (c) green
- 8.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) red (d) magenta
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 10.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 11.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #00ff00
- 12.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
- 13.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) cyan (d) yellow
- 14.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #ffffff
- 15.🌈 Which colour of light is strongest in rgb(49, 153, 70)? (a) blue (b) red (c) green
- 16.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(132, 140, 226)? (a) red (b) blue (c) green
- 18.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 20.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) magenta (c) yellow (d) bright green
- 21.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #000000 (d) #0000ff
- 22.🌈 Which colour is #000000? (a) red (b) yellow (c) blue (d) black
- 23.🌈 Which colour of light is strongest in rgb(205, 36, 105)? (a) red (b) blue (c) green
- 24.🌈 In #1c0000 the red part is the hex number 1c. What is it as a normal number?
- 25.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?
- 26.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(118, 247, 4)? (a) blue (b) green (c) red
- 28.🌈 Which colour of light is strongest in rgb(6, 219, 137)? (a) green (b) blue (c) red
- 29.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #0000ff
- 30.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) blue (d) white
- 31.🌈 Which colour of light is strongest in rgb(136, 121, 151)? (a) red (b) blue (c) green
- 32.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) red (d) blue
- 33.🌈 Which colour of light is strongest in rgb(36, 234, 40)? (a) green (b) red (c) blue
- 34.🌈 Which colour of light is strongest in rgb(44, 107, 163)? (a) green (b) blue (c) red
- 35.🌈 In #000029 the blue part is the hex number 29. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(70, 103, 192)? (a) red (b) green (c) blue
- 37.🌈 Which colour of light is strongest in rgb(231, 48, 1)? (a) blue (b) red (c) green
- 38.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) magenta (d) yellow
- 39.🌈 In #00d900 the green part is the hex number d9. What is it as a normal number?
- 40.🌈 In #3f0000 the red part is the hex number 3f. What is it as a normal number?
Answer key
- F
- yellow
- magenta
- red
- 74
- blue
- red
- white
- 255
- red
- #00ffff
- 34
- cyan
- #ffff00
- green
- 97
- blue
- 115
- 3
- yellow
- #ffffff
- black
- red
- 28
- 232
- 35
- green
- green
- #ff00ff
- blue
- blue
- bright green
- green
- blue
- 41
- blue
- red
- magenta
- 217
- 63
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids