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(103, 65, 152)? (a) green (b) blue (c) red
- 2.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) magenta (c) black (d) bright green
- 3.🌈 Which hex code is black? (a) #00ffff (b) #ffffff (c) #000000 (d) #ff00ff
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 5.🌈 Which colour of light is strongest in rgb(99, 182, 35)? (a) blue (b) green (c) red
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 7.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
- 8.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
- 9.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(103, 168, 108)? (a) blue (b) red (c) green
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 12.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) yellow (d) cyan
- 13.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) red (d) cyan
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 15.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
- 16.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #ff0000 (d) #0000ff
- 17.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
- 19.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) red (d) white
- 20.🌈 Which colour of light is strongest in rgb(107, 202, 135)? (a) red (b) blue (c) green
- 21.🌈 In #000018 the blue part is the hex number 18. What is it as a normal number?
- 22.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff0000
- 23.🌈 Which colour is #ffffff? (a) yellow (b) blue (c) white (d) bright green
- 24.🌈 Which colour of light is strongest in rgb(211, 19, 31)? (a) green (b) blue (c) red
- 25.🌈 Which colour is #000000? (a) red (b) bright green (c) blue (d) black
- 26.🌈 In #00e700 the green part is the hex number e7. What is it as a normal number?
- 27.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) magenta (c) red (d) blue
- 28.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
- 29.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) red (d) magenta
- 30.🌈 Which colour of light is strongest in rgb(104, 185, 42)? (a) green (b) red (c) blue
- 31.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #0000ff
- 32.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #000000 (d) #0000ff
- 33.🌈 In #d40000 the red part is the hex number d4. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(30, 90, 163)? (a) red (b) blue (c) green
- 35.🌈 Which colour of light is strongest in rgb(179, 3, 62)? (a) blue (b) green (c) red
- 36.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
- 37.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff0000
- 38.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) black (d) blue
- 39.🌈 Which colour is #ff0000? (a) cyan (b) red (c) bright green (d) blue
- 40.🌈 Which colour of light is strongest in rgb(129, 156, 90)? (a) blue (b) red (c) green
Answer key
- blue
- bright green
- #000000
- blue
- green
- red
- 52
- 68
- 159
- green
- F
- black
- cyan
- 3
- 243
- #0000ff
- 17
- red
- magenta
- green
- 24
- #00ff00
- white
- red
- black
- 231
- blue
- 8
- blue
- green
- #ffffff
- #ffff00
- 212
- blue
- red
- 80
- #ff0000
- yellow
- red
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids