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 first two digits give? (a) red (b) green (c) blue (d) black
- 2.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) magenta (d) white
- 3.🌈 Which colour of light is strongest in rgb(220, 42, 26)? (a) green (b) red (c) blue
- 4.🌈 Which hex code is blue? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
- 5.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
- 6.🌈 Which colour is #ff00ff? (a) white (b) red (c) cyan (d) magenta
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 8.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) white (c) blue (d) black
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 4 (d) 3
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 11.🌈 Which colour of light is strongest in rgb(137, 81, 160)? (a) red (b) blue (c) green
- 12.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
- 13.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) cyan (d) white
- 14.🌈 Which colour is #00ffff? (a) red (b) black (c) yellow (d) cyan
- 15.🌈 Which colour of light is strongest in rgb(132, 205, 28)? (a) green (b) red (c) blue
- 16.🌈 Which colour of light is strongest in rgb(191, 126, 50)? (a) blue (b) red (c) green
- 17.🌈 Which hex code is red? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #0000ff
- 18.🌈 Which colour is #000000? (a) white (b) black (c) magenta (d) yellow
- 19.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) red (c) black (d) magenta
- 20.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) red (d) blue
- 21.🌈 Which colour of light is strongest in rgb(47, 243, 14)? (a) red (b) green (c) blue
- 22.🌈 In #000096 the blue part is the hex number 96. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(129, 205, 3)? (a) green (b) red (c) blue
- 24.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 25.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(27, 245, 125)? (a) green (b) red (c) blue
- 27.🌈 Which colour of light is strongest in rgb(195, 81, 52)? (a) red (b) green (c) blue
- 28.🌈 Which hex code is yellow? (a) #0000ff (b) #00ffff (c) #ffff00 (d) #ff0000
- 29.🌈 Which colour is #00ff00? (a) cyan (b) red (c) yellow (d) bright green
- 30.🌈 Which colour of light is strongest in rgb(89, 250, 128)? (a) blue (b) red (c) green
- 31.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #0000ff (d) #00ff00
- 32.🌈 Which colour of light is strongest in rgb(237, 29, 83)? (a) green (b) blue (c) red
- 33.🌈 Which colour of light is strongest in rgb(88, 51, 178)? (a) blue (b) green (c) red
- 34.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) magenta (d) blue
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) cyan (d) yellow
- 36.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) white (c) yellow (d) blue
- 37.🌈 Which colour of light is strongest in rgb(28, 163, 76)? (a) red (b) green (c) blue
- 38.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
- 39.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 40.🌈 In #00b300 the green part is the hex number b3. What is it as a normal number?
Answer key
- red
- white
- red
- #0000ff
- 68
- magenta
- F
- blue
- 3
- 255
- blue
- 10
- white
- cyan
- green
- red
- #ff0000
- black
- magenta
- yellow
- green
- 150
- green
- blue
- 190
- green
- red
- #ffff00
- bright green
- green
- #ff00ff
- red
- blue
- cyan
- red
- yellow
- green
- 162
- 16
- 179
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids