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(0, 0, 255)? (a) blue (b) magenta (c) white (d) red
- 2.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
- 3.🌈 Which colour of light is strongest in rgb(249, 77, 6)? (a) red (b) green (c) blue
- 4.🌈 Which colour of light is strongest in rgb(40, 122, 190)? (a) red (b) blue (c) green
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 6.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) cyan (d) bright green
- 7.🌈 Which colour of light is strongest in rgb(225, 17, 41)? (a) green (b) blue (c) red
- 8.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) blue (c) magenta (d) red
- 9.🌈 Which colour is #ff0000? (a) magenta (b) white (c) red (d) cyan
- 10.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #ffff00
- 11.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
- 12.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) blue (d) black
- 13.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) red (d) bright green
- 14.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 17.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
- 18.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #ffffff (d) #00ffff
- 19.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) red (d) white
- 20.🌈 Which colour of light is strongest in rgb(84, 14, 179)? (a) red (b) green (c) blue
- 21.🌈 Which colour is #000000? (a) black (b) red (c) magenta (d) blue
- 22.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
- 23.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) bright green (d) blue
- 24.🌈 Which colour of light is strongest in rgb(4, 95, 151)? (a) red (b) green (c) blue
- 25.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 26.🌈 In #ec0000 the red part is the hex number ec. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(66, 6, 188)? (a) red (b) blue (c) green
- 28.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) yellow (d) white
- 29.🌈 Which colour of light is strongest in rgb(21, 154, 0)? (a) blue (b) green (c) red
- 30.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) red (c) yellow (d) bright green
- 31.🌈 In #0000cc the blue part is the hex number cc. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(52, 162, 132)? (a) green (b) red (c) blue
- 33.🌈 In #480000 the red part is the hex number 48. What is it as a normal number?
- 34.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #00ff00
- 35.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) white (d) red
- 36.🌈 Which colour is #ffffff? (a) black (b) magenta (c) white (d) blue
- 37.🌈 Which colour of light is strongest in rgb(12, 180, 38)? (a) blue (b) red (c) green
- 38.🌈 In #f50000 the red part is the hex number f5. What is it as a normal number?
- 39.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 40.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) red (d) bright green
Answer key
- blue
- 124
- red
- blue
- red
- magenta
- red
- magenta
- red
- #ff0000
- 180
- blue
- black
- blue
- 255
- 3
- 243
- #00ff00
- red
- blue
- black
- 27
- yellow
- blue
- 132
- 236
- blue
- white
- green
- bright green
- 204
- green
- 72
- #ff00ff
- cyan
- white
- green
- 245
- F
- cyan
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids