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 of light is strongest in rgb(13, 186, 60)? (a) blue (b) red (c) green
- 2.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) cyan (d) black
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) red (d) bright green
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 5.🌈 Which colour of light is strongest in rgb(81, 39, 220)? (a) red (b) green (c) blue
- 6.🌈 Which hex code is red? (a) #ff00ff (b) #ff0000 (c) #00ffff (d) #ffffff
- 7.🌈 Which colour is #000000? (a) white (b) black (c) magenta (d) red
- 8.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ffffff
- 9.🌈 Which colour is #ff0000? (a) blue (b) red (c) magenta (d) white
- 10.🌈 Which hex code is blue? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #ffff00
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 12.🌈 Which colour of light is strongest in rgb(108, 224, 136)? (a) green (b) blue (c) red
- 13.🌈 Which colour of light is strongest in rgb(190, 140, 101)? (a) red (b) green (c) blue
- 14.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #ff00ff
- 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 16.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) blue (d) white
- 17.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
- 18.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) cyan (d) bright green
- 19.🌈 In #ff0000 the red part is the hex number ff. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) black (d) magenta
- 21.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #ffffff (d) #00ff00
- 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 23.🌈 Which colour is #ffffff? (a) white (b) cyan (c) blue (d) magenta
- 24.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #000000
- 25.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
- 26.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) yellow (d) white
- 27.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) black (c) blue (d) bright green
- 28.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
- 29.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 30.🌈 In #000027 the blue part is the hex number 27. What is it as a normal number?
- 31.🌈 In #00008e the blue part is the hex number 8e. What is it as a normal number?
- 32.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(183, 135, 122)? (a) blue (b) red (c) green
- 34.🌈 Which colour of light is strongest in rgb(22, 251, 89)? (a) red (b) blue (c) green
- 35.🌈 Which colour of light is strongest in rgb(104, 0, 158)? (a) red (b) blue (c) green
- 36.🌈 In #610000 the red part is the hex number 61. What is it as a normal number?
- 37.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #00ff00
- 38.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
- 39.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) blue (d) cyan
- 40.🌈 Which colour of light is strongest in rgb(37, 52, 220)? (a) red (b) blue (c) green
Answer key
- green
- yellow
- red
- blue
- blue
- #ff0000
- black
- #000000
- red
- #0000ff
- red
- green
- red
- #ff00ff
- 3
- magenta
- 84
- bright green
- 255
- cyan
- #00ffff
- F
- white
- #00ff00
- 52
- blue
- blue
- 59
- 255
- 39
- 142
- 106
- red
- green
- blue
- 97
- #ffff00
- 9
- black
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids