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(198, 98, 33)? (a) red (b) blue (c) green
- 2.🌈 Which colour of light is strongest in rgb(163, 23, 24)? (a) red (b) blue (c) green
- 3.🌈 Which colour of light is strongest in rgb(251, 32, 63)? (a) red (b) green (c) blue
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 5.🌈 Which colour is #00ffff? (a) bright green (b) black (c) cyan (d) magenta
- 6.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) white (c) bright green (d) black
- 7.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) bright green (d) white
- 8.🌈 Which colour is #ffff00? (a) magenta (b) white (c) yellow (d) black
- 9.🌈 Which colour of light is strongest in rgb(25, 169, 47)? (a) blue (b) green (c) red
- 10.🌈 Which colour of light is strongest in rgb(110, 42, 187)? (a) green (b) blue (c) red
- 11.🌈 Which hex code is yellow? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #0000ff
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 13.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
- 14.🌈 Which colour is #ff0000? (a) blue (b) red (c) bright green (d) black
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 16.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #ff00ff
- 17.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?
- 18.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(92, 186, 34)? (a) green (b) red (c) blue
- 20.🌈 Which colour is #000000? (a) blue (b) black (c) bright green (d) white
- 21.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
- 22.🌈 Which hex code is cyan? (a) #00ffff (b) #ffffff (c) #000000 (d) #0000ff
- 23.🌈 Which colour of light is strongest in rgb(241, 24, 123)? (a) blue (b) red (c) green
- 24.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) cyan (d) bright green
- 25.🌈 In #0000a5 the blue part is the hex number a5. What is it as a normal number?
- 26.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) cyan
- 27.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #0000ff
- 28.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #ffffff
- 29.🌈 Which colour of light is strongest in rgb(29, 173, 23)? (a) green (b) blue (c) red
- 30.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 31.🌈 In #003d00 the green part is the hex number 3d. What is it as a normal number?
- 32.🌈 Which hex code is blue? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #0000ff
- 33.🌈 Which colour of light is strongest in rgb(231, 76, 6)? (a) green (b) blue (c) red
- 34.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) red (d) blue
- 36.🌈 Which colour of light is strongest in rgb(13, 246, 103)? (a) red (b) blue (c) green
- 37.🌈 Which colour is #00ff00? (a) bright green (b) red (c) cyan (d) black
- 38.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) magenta (d) blue
- 39.🌈 Which colour of light is strongest in rgb(219, 85, 42)? (a) red (b) green (c) blue
- 40.🌈 Which colour of light is strongest in rgb(173, 81, 124)? (a) red (b) blue (c) green
Answer key
- red
- red
- red
- 3
- cyan
- black
- magenta
- yellow
- green
- blue
- #ffff00
- blue
- 129
- red
- F
- #ffffff
- 188
- 77
- green
- black
- 91
- #00ffff
- red
- yellow
- 165
- bright green
- #ff00ff
- #ff0000
- green
- red
- 61
- #0000ff
- red
- 205
- white
- green
- bright green
- blue
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids