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 colour is #000000? (a) yellow (b) black (c) white (d) red
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 3.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
- 4.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
- 5.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ffffff
- 6.🌈 Which hex code is black? (a) #0000ff (b) #ff00ff (c) #000000 (d) #ffff00
- 7.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) blue (c) bright green (d) white
- 8.🌈 Which colour of light is strongest in rgb(164, 10, 39)? (a) green (b) red (c) blue
- 9.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) black (d) magenta
- 10.🌈 Which colour of light is strongest in rgb(124, 32, 253)? (a) red (b) green (c) blue
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 12.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff0000
- 13.🌈 In #670000 the red part is the hex number 67. What is it as a normal number?
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 15.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #ff00ff
- 16.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) magenta (d) black
- 17.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
- 18.🌈 Which colour is #ffff00? (a) cyan (b) black (c) bright green (d) yellow
- 19.🌈 Which colour of light is strongest in rgb(46, 2, 253)? (a) green (b) blue (c) red
- 20.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
- 21.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 22.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) white (c) yellow (d) blue
- 23.🌈 In #0000bc the blue part is the hex number bc. What is it as a normal number?
- 24.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 25.🌈 In #003200 the green part is the hex number 32. What is it as a normal number?
- 26.🌈 In #00ec00 the green part is the hex number ec. What is it as a normal number?
- 27.🌈 In #000e00 the green part is the hex number 0e. What is it as a normal number?
- 28.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
- 29.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #ff0000 (d) #00ffff
- 30.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(206, 44, 75)? (a) blue (b) red (c) green
- 32.🌈 Which colour of light is strongest in rgb(157, 10, 105)? (a) green (b) blue (c) red
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) bright green (c) red (d) black
- 34.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) bright green (c) cyan (d) magenta
- 35.🌈 Which colour is #00ff00? (a) cyan (b) yellow (c) bright green (d) blue
- 36.🌈 Which colour of light is strongest in rgb(115, 253, 22)? (a) green (b) red (c) blue
- 37.🌈 Which colour is #ff0000? (a) black (b) cyan (c) magenta (d) red
- 38.🌈 Which colour of light is strongest in rgb(139, 191, 44)? (a) red (b) green (c) blue
- 39.🌈 Which colour is #ffffff? (a) white (b) blue (c) bright green (d) red
- 40.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
Answer key
- black
- 255
- #ffffff
- 75
- #00ff00
- #000000
- bright green
- red
- cyan
- blue
- F
- #ff0000
- 103
- 3
- #ffff00
- white
- 41
- yellow
- blue
- 11
- blue
- blue
- 188
- red
- 50
- 236
- 14
- red
- #00ffff
- 25
- red
- red
- black
- magenta
- bright green
- green
- red
- green
- white
- 136
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids