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) Z (b) G (c) F (d) J
- 2.🌈 Which hex code is blue? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #0000ff
- 3.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) bright green (d) white
- 4.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) blue (d) cyan
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 7.🌈 Which colour is #ff00ff? (a) red (b) yellow (c) black (d) magenta
- 8.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
- 9.🌈 In #00bd00 the green part is the hex number bd. What is it as a normal number?
- 10.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #00ff00
- 11.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 13.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) white (d) yellow
- 14.🌈 Which colour of light is strongest in rgb(190, 8, 103)? (a) blue (b) green (c) red
- 15.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(124, 1, 245)? (a) blue (b) red (c) green
- 17.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ffffff
- 18.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) yellow (c) red (d) magenta
- 19.🌈 Which colour of light is strongest in rgb(103, 114, 222)? (a) blue (b) red (c) green
- 20.🌈 Which colour is #ff0000? (a) white (b) cyan (c) bright green (d) red
- 21.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 22.🌈 Which colour is #0000ff? (a) white (b) black (c) yellow (d) blue
- 23.🌈 Which colour of light is strongest in rgb(173, 10, 115)? (a) red (b) blue (c) green
- 24.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(224, 54, 18)? (a) red (b) blue (c) green
- 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
- 27.🌈 Which hex code is black? (a) #0000ff (b) #ff00ff (c) #000000 (d) #ffffff
- 28.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
- 29.🌈 Which colour is #ffffff? (a) yellow (b) bright green (c) white (d) cyan
- 30.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) yellow (d) bright green
- 31.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) black (c) blue (d) bright green
- 32.🌈 Which colour of light is strongest in rgb(51, 16, 219)? (a) blue (b) green (c) red
- 33.🌈 Which hex code is white? (a) #ffffff (b) #000000 (c) #00ffff (d) #ffff00
- 34.🌈 Which colour of light is strongest in rgb(2, 208, 2)? (a) blue (b) green (c) red
- 35.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
- 36.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
- 37.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 38.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) yellow (d) bright green
- 39.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
- 40.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
Answer key
- F
- #0000ff
- bright green
- red
- red
- 255
- magenta
- 57
- 189
- #ffff00
- 115
- blue
- yellow
- red
- 89
- blue
- #00ffff
- magenta
- blue
- red
- 64
- blue
- red
- 40
- red
- 3
- #000000
- 53
- white
- white
- blue
- blue
- #ffffff
- green
- 163
- 152
- 132
- cyan
- 139
- 52
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids