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(66, 140, 239)? (a) green (b) blue (c) red
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 3.🌈 Which hex code is magenta? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
- 4.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffff00
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 7.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
- 8.🌈 Which colour is #00ff00? (a) white (b) red (c) bright green (d) black
- 9.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) black (d) cyan
- 10.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) black (d) red
- 11.🌈 Which colour of light is strongest in rgb(168, 105, 83)? (a) green (b) red (c) blue
- 12.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) black (d) white
- 13.🌈 Which colour of light is strongest in rgb(244, 15, 36)? (a) red (b) blue (c) green
- 14.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
- 15.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) magenta (c) blue (d) bright green
- 16.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
- 17.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) blue (d) white
- 19.🌈 Which colour of light is strongest in rgb(79, 157, 48)? (a) blue (b) green (c) red
- 20.🌈 Which colour of light is strongest in rgb(192, 25, 61)? (a) green (b) blue (c) red
- 21.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
- 22.🌈 Which hex code is black? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #000000
- 23.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(233, 68, 33)? (a) blue (b) red (c) green
- 25.🌈 Which colour of light is strongest in rgb(127, 35, 228)? (a) green (b) red (c) blue
- 26.🌈 In #9f0000 the red part is the hex number 9f. What is it as a normal number?
- 27.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
- 28.🌈 In #00ef00 the green part is the hex number ef. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(54, 94, 168)? (a) green (b) red (c) blue
- 30.🌈 Which colour of light is strongest in rgb(89, 249, 36)? (a) green (b) red (c) blue
- 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 32.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
- 33.🌈 In #00d600 the green part is the hex number d6. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(12, 164, 44)? (a) green (b) red (c) blue
- 35.🌈 Which colour of light is strongest in rgb(180, 138, 91)? (a) blue (b) red (c) green
- 36.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 37.🌈 Which colour is #000000? (a) black (b) red (c) cyan (d) blue
- 38.🌈 Which colour is #ffffff? (a) white (b) cyan (c) yellow (d) red
- 39.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 40.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
Answer key
- blue
- blue
- #ff00ff
- #00ff00
- red
- F
- #ffffff
- bright green
- white
- cyan
- red
- cyan
- red
- 88
- bright green
- 72
- 106
- red
- green
- red
- 210
- #000000
- 25
- red
- blue
- 159
- 96
- 239
- blue
- green
- 3
- #ffff00
- 214
- green
- red
- 241
- black
- white
- 255
- #ff0000
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids