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.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 2.🌈 Which colour is #ffff00? (a) black (b) red (c) bright green (d) yellow
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) blue (c) magenta (d) bright green
- 4.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
- 5.🌈 Which colour of light is strongest in rgb(250, 139, 5)? (a) blue (b) green (c) red
- 6.🌈 Which colour is #ff0000? (a) yellow (b) red (c) blue (d) white
- 7.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) cyan (d) bright green
- 8.🌈 Which colour of light is strongest in rgb(240, 28, 102)? (a) red (b) green (c) blue
- 9.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 10.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) white (d) magenta
- 11.🌈 In #890000 the red part is the hex number 89. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 13.🌈 Which colour is #00ffff? (a) yellow (b) magenta (c) cyan (d) red
- 14.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #000000
- 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) cyan (c) red (d) bright green
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 17.🌈 Which colour of light is strongest in rgb(104, 229, 43)? (a) blue (b) red (c) green
- 18.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
- 19.🌈 Which hex code is white? (a) #ffff00 (b) #00ffff (c) #000000 (d) #ffffff
- 20.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(8, 156, 95)? (a) red (b) blue (c) green
- 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 23.🌈 Which colour is #ff00ff? (a) white (b) cyan (c) bright green (d) magenta
- 24.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
- 25.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(29, 150, 42)? (a) red (b) blue (c) green
- 27.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) yellow (d) cyan
- 28.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
- 29.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
- 30.🌈 In #000025 the blue part is the hex number 25. What is it as a normal number?
- 31.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(30, 169, 56)? (a) blue (b) green (c) red
- 33.🌈 Which colour is #000000? (a) magenta (b) cyan (c) black (d) bright green
- 34.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
- 35.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) black
- 36.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ff00
- 37.🌈 Which colour of light is strongest in rgb(82, 17, 152)? (a) red (b) green (c) blue
- 38.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(90, 130, 167)? (a) red (b) blue (c) green
- 40.🌈 In #530000 the red part is the hex number 53. What is it as a normal number?
Answer key
- F
- yellow
- magenta
- 12
- red
- red
- white
- red
- 33
- bright green
- 137
- blue
- cyan
- #ff0000
- red
- 3
- green
- 255
- #ffffff
- 231
- green
- red
- magenta
- 156
- 96
- green
- bright green
- #ffff00
- 48
- 37
- 105
- green
- black
- 67
- blue
- #000000
- blue
- 218
- blue
- 83
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids