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.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 2.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 4.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffffff
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) cyan (d) white
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) yellow (c) bright green (d) black
- 7.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ffffff
- 8.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #000000
- 9.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) blue (d) black
- 11.🌈 Which colour is #00ff00? (a) cyan (b) red (c) bright green (d) yellow
- 12.🌈 Which hex code is cyan? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #00ffff
- 13.🌈 Which colour of light is strongest in rgb(29, 101, 164)? (a) red (b) blue (c) green
- 14.🌈 In #005100 the green part is the hex number 51. What is it as a normal number?
- 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 16.🌈 In #c10000 the red part is the hex number c1. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(44, 239, 65)? (a) red (b) green (c) blue
- 18.🌈 Which colour of light is strongest in rgb(132, 185, 36)? (a) red (b) green (c) blue
- 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 20.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) yellow (d) bright green
- 21.🌈 Which colour of light is strongest in rgb(221, 76, 2)? (a) green (b) blue (c) red
- 22.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
- 23.🌈 Which colour is #ff0000? (a) yellow (b) red (c) blue (d) black
- 24.🌈 Which colour of light is strongest in rgb(192, 96, 125)? (a) red (b) green (c) blue
- 25.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
- 26.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) black (d) cyan
- 27.🌈 Which colour of light is strongest in rgb(99, 150, 51)? (a) green (b) red (c) blue
- 28.🌈 In #00b800 the green part is the hex number b8. What is it as a normal number?
- 29.🌈 In #0000f8 the blue part is the hex number f8. What is it as a normal number?
- 30.🌈 In #fc0000 the red part is the hex number fc. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(187, 138, 5)? (a) green (b) red (c) blue
- 32.🌈 Which colour of light is strongest in rgb(79, 119, 239)? (a) blue (b) green (c) red
- 33.🌈 Which colour is #0000ff? (a) bright green (b) red (c) black (d) blue
- 34.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
- 35.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
- 36.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(113, 182, 71)? (a) red (b) green (c) blue
- 38.🌈 Which colour is #ffffff? (a) magenta (b) white (c) red (d) black
- 39.🌈 Which colour is #000000? (a) yellow (b) black (c) blue (d) bright green
- 40.🌈 Which colour of light is strongest in rgb(47, 220, 25)? (a) green (b) red (c) blue
Answer key
- blue
- 37
- red
- #000000
- red
- bright green
- #ffffff
- #ff00ff
- 167
- white
- bright green
- #00ffff
- blue
- 81
- 3
- 193
- green
- green
- F
- black
- red
- 53
- red
- red
- 57
- cyan
- green
- 184
- 248
- 252
- red
- blue
- blue
- #ff0000
- 83
- 243
- green
- white
- black
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids