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) J (b) F (c) G (d) Z
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) black (d) red
- 4.🌈 Which colour is #00ffff? (a) blue (b) white (c) red (d) cyan
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 6.🌈 In #002500 the green part is the hex number 25. What is it as a normal number?
- 7.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
- 8.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
- 9.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #ff0000
- 10.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) white (d) blue
- 11.🌈 Which colour of light is strongest in rgb(110, 187, 132)? (a) green (b) blue (c) red
- 12.🌈 In #000d00 the green part is the hex number 0d. What is it as a normal number?
- 13.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #00ffff
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 15.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) magenta (d) white
- 16.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #00ff00
- 17.🌈 Which colour of light is strongest in rgb(0, 41, 158)? (a) red (b) blue (c) green
- 18.🌈 Which colour of light is strongest in rgb(162, 85, 111)? (a) blue (b) green (c) red
- 19.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
- 20.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
- 21.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(127, 22, 209)? (a) blue (b) red (c) green
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) white (c) cyan (d) magenta
- 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 25.🌈 Which colour is #ff0000? (a) bright green (b) red (c) white (d) black
- 26.🌈 In #670000 the red part is the hex number 67. What is it as a normal number?
- 27.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #ff0000
- 28.🌈 Which colour is #ffffff? (a) red (b) yellow (c) blue (d) white
- 29.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #000000 (d) #00ff00
- 30.🌈 Which colour of light is strongest in rgb(179, 118, 138)? (a) green (b) red (c) blue
- 31.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(13, 190, 132)? (a) red (b) green (c) blue
- 33.🌈 Which colour of light is strongest in rgb(170, 36, 23)? (a) blue (b) green (c) red
- 34.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
- 35.🌈 Which colour of light is strongest in rgb(36, 164, 121)? (a) red (b) green (c) blue
- 36.🌈 Which colour is #ffff00? (a) black (b) yellow (c) bright green (d) cyan
- 37.🌈 Which colour of light is strongest in rgb(245, 126, 45)? (a) green (b) red (c) blue
- 38.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) white (d) red
- 39.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
- 40.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
Answer key
- F
- blue
- magenta
- cyan
- 255
- 37
- 57
- 143
- #ff0000
- black
- green
- 13
- #00ffff
- red
- bright green
- #00ff00
- blue
- red
- 35
- 130
- 250
- blue
- cyan
- 3
- red
- 103
- #ffffff
- white
- #ffff00
- red
- 226
- green
- red
- #ff00ff
- green
- yellow
- red
- white
- 153
- 34
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids