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.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 2.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?
- 3.🌈 Which colour is #ff00ff? (a) cyan (b) bright green (c) magenta (d) yellow
- 4.🌈 Which hex code is red? (a) #ff0000 (b) #000000 (c) #ffffff (d) #00ffff
- 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) white (d) bright green
- 6.🌈 In #009800 the green part is the hex number 98. What is it as a normal number?
- 7.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #00ffff
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 9.🌈 Which colour of light is strongest in rgb(208, 23, 20)? (a) red (b) blue (c) green
- 10.🌈 Which hex code is black? (a) #ff00ff (b) #0000ff (c) #000000 (d) #ff0000
- 11.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ff00
- 12.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) red (d) white
- 13.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) black (c) cyan (d) red
- 14.🌈 Which colour is #00ff00? (a) black (b) bright green (c) red (d) white
- 15.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) magenta (c) yellow (d) white
- 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 17.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) white (d) red
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 19.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) magenta (d) bright green
- 20.🌈 Which colour of light is strongest in rgb(210, 117, 13)? (a) red (b) green (c) blue
- 21.🌈 Which colour of light is strongest in rgb(8, 199, 111)? (a) red (b) green (c) blue
- 22.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) magenta (d) white
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) bright green (d) red
- 24.🌈 Which colour of light is strongest in rgb(210, 77, 41)? (a) green (b) blue (c) red
- 25.🌈 Which colour of light is strongest in rgb(49, 89, 164)? (a) green (b) red (c) blue
- 26.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
- 27.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
- 28.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #ff00ff
- 29.🌈 In #00004e the blue part is the hex number 4e. What is it as a normal number?
- 30.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
- 31.🌈 In #00cb00 the green part is the hex number cb. What is it as a normal number?
- 32.🌈 In #00db00 the green part is the hex number db. What is it as a normal number?
- 33.🌈 Which colour is #ff0000? (a) red (b) yellow (c) black (d) white
- 34.🌈 Which colour of light is strongest in rgb(165, 4, 49)? (a) blue (b) red (c) green
- 35.🌈 Which colour of light is strongest in rgb(104, 45, 197)? (a) green (b) blue (c) red
- 36.🌈 Which colour of light is strongest in rgb(173, 3, 136)? (a) green (b) red (c) blue
- 37.🌈 In #00ed00 the green part is the hex number ed. What is it as a normal number?
- 38.🌈 Which colour is #000000? (a) blue (b) cyan (c) magenta (d) black
- 39.🌈 Which colour of light is strongest in rgb(46, 249, 38)? (a) blue (b) green (c) red
- 40.🌈 Which colour of light is strongest in rgb(46, 170, 35)? (a) red (b) blue (c) green
Answer key
- 255
- 109
- magenta
- #ff0000
- black
- 152
- #00ff00
- red
- red
- #000000
- #0000ff
- white
- cyan
- bright green
- yellow
- F
- white
- blue
- red
- red
- green
- cyan
- bright green
- red
- blue
- 205
- 171
- #ffff00
- 78
- 75
- 203
- 219
- red
- red
- blue
- red
- 237
- black
- green
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids