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 rgb(255, 0, 255)? (a) black (b) magenta (c) red (d) blue
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) cyan (c) bright green (d) black
- 3.🌈 In #910000 the red part is the hex number 91. What is it as a normal number?
- 4.🌈 Which colour is #ffffff? (a) magenta (b) red (c) white (d) yellow
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 8.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) cyan (d) magenta
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 10.🌈 Which hex code is magenta? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ff00ff
- 11.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(114, 20, 220)? (a) blue (b) green (c) red
- 13.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
- 14.🌈 Which colour of light is strongest in rgb(158, 15, 38)? (a) red (b) blue (c) green
- 15.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
- 16.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
- 17.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
- 19.🌈 In #0000be the blue part is the hex number be. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) white (d) cyan
- 21.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) red (c) magenta (d) white
- 22.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ffffff
- 23.🌈 Which colour is #00ffff? (a) red (b) bright green (c) magenta (d) cyan
- 24.🌈 Which colour of light is strongest in rgb(123, 115, 175)? (a) green (b) blue (c) red
- 25.🌈 In #0000a3 the blue part is the hex number a3. What is it as a normal number?
- 26.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?
- 27.🌈 Which hex code is white? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #ffffff
- 28.🌈 Which colour of light is strongest in rgb(171, 126, 105)? (a) blue (b) green (c) red
- 29.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(213, 43, 0)? (a) green (b) blue (c) red
- 31.🌈 Which colour of light is strongest in rgb(245, 98, 121)? (a) green (b) blue (c) red
- 32.🌈 Which colour is #ff0000? (a) yellow (b) black (c) white (d) red
- 33.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) bright green (d) magenta
- 34.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) bright green (d) white
- 35.🌈 Which colour of light is strongest in rgb(171, 122, 28)? (a) red (b) blue (c) green
- 36.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
- 37.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(222, 0, 101)? (a) green (b) blue (c) red
- 39.🌈 Which colour is #0000ff? (a) blue (b) red (c) magenta (d) cyan
- 40.🌈 Which colour of light is strongest in rgb(249, 117, 50)? (a) blue (b) green (c) red
Answer key
- magenta
- black
- 145
- white
- 3
- F
- red
- magenta
- 255
- #ff00ff
- 172
- blue
- 240
- red
- 40
- 61
- 75
- blue
- 190
- blue
- white
- #00ff00
- cyan
- blue
- 163
- 43
- #ffffff
- red
- 87
- red
- red
- red
- bright green
- red
- red
- 15
- 28
- red
- blue
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids