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(5, 219, 45)? (a) blue (b) red (c) green
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) blue
- 3.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffff00
- 4.🌈 Which colour of light is strongest in rgb(124, 168, 69)? (a) green (b) blue (c) red
- 5.🌈 Which colour of light is strongest in rgb(16, 212, 89)? (a) red (b) green (c) blue
- 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 7.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffffff (d) #ffff00
- 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 9.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) magenta (d) black
- 10.🌈 Which colour of light is strongest in rgb(208, 76, 0)? (a) red (b) green (c) blue
- 11.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) yellow (c) cyan (d) bright green
- 12.🌈 Which hex code is black? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #000000
- 13.🌈 Which colour of light is strongest in rgb(15, 5, 191)? (a) green (b) red (c) blue
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) white (d) bright green
- 15.🌈 In #00002e the blue part is the hex number 2e. What is it as a normal number?
- 16.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) magenta (d) blue
- 17.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 18.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) cyan (d) white
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 20.🌈 Which hex code is white? (a) #00ffff (b) #000000 (c) #ffffff (d) #00ff00
- 21.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) magenta
- 22.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
- 23.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #ffff00
- 24.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(68, 170, 25)? (a) red (b) blue (c) green
- 26.🌈 Which colour is #ff0000? (a) black (b) red (c) yellow (d) magenta
- 27.🌈 Which colour is #ffffff? (a) white (b) black (c) bright green (d) blue
- 28.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 29.🌈 Which colour is #000000? (a) red (b) black (c) magenta (d) white
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) yellow
- 31.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
- 32.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) white (d) red
- 33.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(49, 223, 28)? (a) green (b) red (c) blue
- 35.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) magenta
- 36.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #00ffff (d) #0000ff
- 37.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) white (d) red
- 38.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 39.🌈 Which colour of light is strongest in rgb(135, 156, 97)? (a) blue (b) red (c) green
- 40.🌈 In #9f0000 the red part is the hex number 9f. What is it as a normal number?
Answer key
- green
- black
- #ff00ff
- green
- green
- 255
- #0000ff
- 3
- blue
- red
- magenta
- #000000
- blue
- bright green
- 46
- blue
- 69
- bright green
- blue
- #ffffff
- yellow
- 230
- #ff0000
- 196
- green
- red
- white
- red
- black
- cyan
- 228
- red
- 96
- green
- cyan
- #00ff00
- magenta
- F
- green
- 159
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids