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 hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #00ffff
- 2.🌈 In #8a0000 the red part is the hex number 8a. What is it as a normal number?
- 3.🌈 Which colour of light is strongest in rgb(167, 7, 105)? (a) blue (b) green (c) red
- 4.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) bright green (c) blue (d) black
- 5.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
- 6.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #00ffff
- 7.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) bright green (d) yellow
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 10.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
- 11.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
- 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
- 14.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?
- 15.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) yellow (d) magenta
- 17.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #00ff00
- 18.🌈 Which colour is #ffff00? (a) black (b) red (c) bright green (d) yellow
- 19.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ff00ff
- 20.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) blue (d) yellow
- 21.🌈 Which colour is #000000? (a) black (b) magenta (c) yellow (d) bright green
- 22.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
- 23.🌈 Which colour is #00ff00? (a) blue (b) white (c) magenta (d) bright green
- 24.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) black (d) blue
- 26.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) blue (d) bright green
- 27.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #0000ff (d) #ff0000
- 28.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) blue (c) magenta (d) white
- 29.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) cyan
- 30.🌈 Which colour of light is strongest in rgb(123, 123, 214)? (a) green (b) red (c) blue
- 31.🌈 In #0000af the blue part is the hex number af. What is it as a normal number?
- 32.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
- 33.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) blue (c) yellow (d) white
- 34.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(1, 87, 173)? (a) green (b) red (c) blue
- 36.🌈 Which colour is #ffffff? (a) magenta (b) cyan (c) white (d) blue
- 37.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(27, 93, 237)? (a) green (b) blue (c) red
- 39.🌈 Which colour of light is strongest in rgb(249, 38, 28)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(251, 40, 126)? (a) red (b) blue (c) green
Answer key
- #00ff00
- 138
- red
- black
- 147
- #ffffff
- cyan
- red
- blue
- 61
- 18
- 3
- F
- 131
- 57
- bright green
- #00ffff
- yellow
- #000000
- yellow
- black
- 205
- bright green
- #ffff00
- blue
- cyan
- #0000ff
- magenta
- magenta
- blue
- 175
- 197
- white
- 246
- blue
- white
- 59
- blue
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids