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 is rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) blue
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) white (d) magenta
- 4.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
- 5.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #00ff00 (d) #ffff00
- 6.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) white (d) cyan
- 7.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #00ffff
- 8.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 10.🌈 Which colour of light is strongest in rgb(53, 117, 197)? (a) red (b) green (c) blue
- 11.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) yellow (d) red
- 12.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) cyan (d) magenta
- 13.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #ffffff
- 14.🌈 Which colour is #00ffff? (a) black (b) bright green (c) white (d) cyan
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
- 16.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) white (c) red (d) black
- 17.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 18.🌈 Which colour is #ffff00? (a) bright green (b) white (c) magenta (d) yellow
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 20.🌈 Which colour of light is strongest in rgb(16, 244, 33)? (a) green (b) blue (c) red
- 21.🌈 Which colour of light is strongest in rgb(140, 208, 38)? (a) red (b) blue (c) green
- 22.🌈 Which colour is #ff0000? (a) blue (b) red (c) cyan (d) magenta
- 23.🌈 Which colour is #00ff00? (a) bright green (b) white (c) blue (d) cyan
- 24.🌈 Which hex code is bright green? (a) #0000ff (b) #000000 (c) #00ffff (d) #00ff00
- 25.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
- 26.🌈 Which colour is #0000ff? (a) black (b) bright green (c) white (d) blue
- 27.🌈 Which colour of light is strongest in rgb(189, 126, 85)? (a) green (b) red (c) blue
- 28.🌈 Which colour is #ffffff? (a) white (b) red (c) bright green (d) cyan
- 29.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(53, 202, 54)? (a) green (b) blue (c) red
- 31.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(211, 101, 84)? (a) green (b) red (c) blue
- 33.🌈 Which colour of light is strongest in rgb(118, 178, 14)? (a) red (b) green (c) blue
- 34.🌈 Which colour of light is strongest in rgb(81, 83, 174)? (a) green (b) blue (c) red
- 35.🌈 In #00b800 the green part is the hex number b8. What is it as a normal number?
- 36.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(166, 102, 120)? (a) green (b) blue (c) red
- 38.🌈 In #00005e the blue part is the hex number 5e. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(138, 196, 105)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(13, 246, 54)? (a) blue (b) red (c) green
Answer key
- black
- 255
- blue
- 250
- #ffffff
- white
- #ff0000
- 71
- blue
- blue
- bright green
- cyan
- #ff00ff
- cyan
- F
- red
- red
- yellow
- 3
- green
- green
- red
- bright green
- #00ff00
- 58
- blue
- red
- white
- 76
- green
- 167
- red
- green
- blue
- 184
- 250
- red
- 94
- green
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids