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) F (b) G (c) J (d) Z
- 2.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) blue (d) bright green
- 3.🌈 Which colour of light is strongest in rgb(0, 52, 226)? (a) blue (b) green (c) red
- 4.🌈 In #0000a0 the blue part is the hex number a0. What is it as a normal number?
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 6.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #0000ff
- 7.🌈 Which colour of light is strongest in rgb(109, 170, 5)? (a) red (b) green (c) blue
- 8.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 10.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
- 11.🌈 Which colour of light is strongest in rgb(90, 172, 140)? (a) red (b) blue (c) green
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 14.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) magenta (d) cyan
- 15.🌈 Which colour of light is strongest in rgb(219, 61, 6)? (a) red (b) blue (c) green
- 16.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
- 17.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #ff0000
- 18.🌈 Which colour is #ff0000? (a) red (b) bright green (c) white (d) blue
- 19.🌈 Which colour of light is strongest in rgb(230, 84, 140)? (a) red (b) green (c) blue
- 20.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) white (d) red
- 21.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) bright green (d) black
- 22.🌈 Which colour of light is strongest in rgb(90, 113, 233)? (a) green (b) red (c) blue
- 23.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
- 24.🌈 In #e40000 the red part is the hex number e4. What is it as a normal number?
- 25.🌈 Which hex code is bright green? (a) #ffffff (b) #ff0000 (c) #ffff00 (d) #00ff00
- 26.🌈 Which colour of light is strongest in rgb(127, 75, 236)? (a) red (b) blue (c) green
- 27.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) bright green (d) red
- 28.🌈 Which colour of light is strongest in rgb(66, 173, 17)? (a) red (b) green (c) blue
- 29.🌈 Which colour of light is strongest in rgb(119, 183, 90)? (a) green (b) blue (c) red
- 30.🌈 Which colour is #00ffff? (a) white (b) black (c) bright green (d) cyan
- 31.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) red (c) cyan (d) bright green
- 32.🌈 In #0000cc the blue part is the hex number cc. What is it as a normal number?
- 33.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?
- 34.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #0000ff
- 35.🌈 Which colour of light is strongest in rgb(23, 159, 24)? (a) green (b) blue (c) red
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) bright green (d) red
- 37.🌈 In #005700 the green part is the hex number 57. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(171, 136, 16)? (a) green (b) blue (c) red
- 39.🌈 In #001900 the green part is the hex number 19. What is it as a normal number?
- 40.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
Answer key
- F
- yellow
- blue
- 160
- blue
- #ff0000
- green
- 158
- 3
- #ffffff
- green
- red
- 255
- cyan
- red
- 50
- #ffff00
- red
- red
- bright green
- magenta
- blue
- 147
- 228
- #00ff00
- blue
- white
- green
- green
- cyan
- bright green
- 204
- 193
- #ff00ff
- green
- blue
- 87
- red
- 25
- 9
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids