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.🌈 In #b90000 the red part is the hex number b9. What is it as a normal number?
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 3.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ff00ff (d) #000000
- 4.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
- 5.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) bright green (d) yellow
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 7.🌈 Which colour is #ff00ff? (a) cyan (b) black (c) magenta (d) red
- 8.🌈 Which hex code is blue? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #0000ff
- 9.🌈 Which colour is #0000ff? (a) red (b) blue (c) white (d) magenta
- 10.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #000000 (d) #ff0000
- 11.🌈 Which colour is #ff0000? (a) yellow (b) white (c) blue (d) red
- 12.🌈 In #00003a the blue part is the hex number 3a. What is it as a normal number?
- 13.🌈 Which colour is #ffff00? (a) red (b) yellow (c) white (d) blue
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) yellow (c) magenta (d) black
- 16.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) blue (c) bright green (d) red
- 17.🌈 In #0000ce the blue part is the hex number ce. What is it as a normal number?
- 18.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(130, 37, 215)? (a) red (b) blue (c) green
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 21.🌈 Which hex code is magenta? (a) #000000 (b) #ffffff (c) #00ff00 (d) #ff00ff
- 22.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
- 23.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ff00ff (d) #00ffff
- 24.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 25.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
- 26.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
- 27.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
- 28.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) white (d) red
- 29.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) magenta (d) cyan
- 30.🌈 Which colour is #000000? (a) red (b) white (c) cyan (d) black
- 31.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) blue (d) yellow
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) red (c) cyan (d) yellow
- 33.🌈 Which colour is #00ffff? (a) cyan (b) black (c) magenta (d) bright green
- 34.🌈 Which colour of light is strongest in rgb(80, 212, 110)? (a) green (b) red (c) blue
- 35.🌈 Which colour of light is strongest in rgb(139, 70, 246)? (a) green (b) blue (c) red
- 36.🌈 Which colour of light is strongest in rgb(24, 31, 193)? (a) green (b) blue (c) red
- 37.🌈 Which colour of light is strongest in rgb(65, 67, 192)? (a) red (b) green (c) blue
- 38.🌈 Which colour of light is strongest in rgb(193, 112, 93)? (a) green (b) blue (c) red
- 39.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ff0000
- 40.🌈 In #00007a the blue part is the hex number 7a. What is it as a normal number?
Answer key
- 185
- F
- #ffff00
- 0
- yellow
- 3
- magenta
- #0000ff
- blue
- #ffffff
- red
- 58
- yellow
- 255
- magenta
- red
- 206
- 0
- blue
- red
- #ff00ff
- 66
- #000000
- blue
- #ff0000
- 147
- 33
- white
- bright green
- black
- blue
- cyan
- cyan
- green
- blue
- blue
- blue
- red
- #00ffff
- 122
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids