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 colour of light is strongest in rgb(53, 210, 10)? (a) red (b) green (c) blue
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) bright green (d) cyan
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
- 5.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
- 6.🌈 In #bd0000 the red part is the hex number bd. What is it as a normal number?
- 7.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 9.🌈 In #ef0000 the red part is the hex number ef. What is it as a normal number?
- 10.🌈 Which colour is #0000ff? (a) blue (b) black (c) red (d) bright green
- 11.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) bright green (d) black
- 12.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ff0000
- 13.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
- 14.🌈 Which hex code is blue? (a) #ff00ff (b) #0000ff (c) #ffffff (d) #ffff00
- 15.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) white (d) magenta
- 16.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ff00ff
- 17.🌈 Which hex code is red? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #000000
- 18.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 19.🌈 In #000088 the blue part is the hex number 88. What is it as a normal number?
- 20.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
- 21.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(150, 63, 30)? (a) red (b) blue (c) green
- 23.🌈 Which colour of light is strongest in rgb(132, 78, 191)? (a) red (b) blue (c) green
- 24.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?
- 25.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
- 26.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) black (d) blue
- 27.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
- 28.🌈 Which colour is #ffff00? (a) black (b) magenta (c) yellow (d) bright green
- 29.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 30.🌈 Which hex code is white? (a) #ffffff (b) #000000 (c) #0000ff (d) #ff0000
- 31.🌈 Which colour of light is strongest in rgb(99, 180, 96)? (a) blue (b) green (c) red
- 32.🌈 Which colour is #ff00ff? (a) red (b) bright green (c) blue (d) magenta
- 33.🌈 Which colour of light is strongest in rgb(16, 96, 176)? (a) red (b) blue (c) green
- 34.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) bright green (d) yellow
- 35.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
- 36.🌈 Which colour is #00ffff? (a) blue (b) white (c) cyan (d) bright green
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) red (d) cyan
- 38.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) white
- 39.🌈 In #0000ae the blue part is the hex number ae. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(173, 87, 113)? (a) red (b) green (c) blue
Answer key
- green
- blue
- cyan
- 3
- 9
- 189
- 52
- F
- 239
- blue
- yellow
- #000000
- 34
- #0000ff
- black
- #ff00ff
- #ff0000
- 255
- 136
- 168
- 25
- red
- blue
- 49
- 51
- bright green
- 229
- yellow
- red
- #ffffff
- green
- magenta
- blue
- magenta
- 141
- cyan
- red
- black
- 174
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids