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) 1000 (b) 99 (c) 255 (d) 100
- 2.🌈 Which hex code is magenta? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ff00ff
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 4.🌈 Which colour of light is strongest in rgb(206, 6, 104)? (a) red (b) blue (c) green
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 6.🌈 Which hex code is bright green? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #00ff00
- 7.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) white (c) yellow (d) red
- 8.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
- 9.🌈 Which hex code is red? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffffff
- 10.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) magenta (c) white (d) blue
- 11.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ffff (d) #ff0000
- 12.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) white
- 13.🌈 Which colour of light is strongest in rgb(121, 246, 127)? (a) red (b) blue (c) green
- 14.🌈 In #bb0000 the red part is the hex number bb. What is it as a normal number?
- 15.🌈 Which hex code is white? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #ffffff
- 16.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
- 17.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) black (d) white
- 18.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
- 19.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) red (d) yellow
- 20.🌈 Which colour is #ff00ff? (a) white (b) black (c) magenta (d) blue
- 21.🌈 Which colour is #000000? (a) black (b) yellow (c) blue (d) red
- 22.🌈 Which colour is #ffffff? (a) white (b) black (c) blue (d) bright green
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) white (d) bright green
- 24.🌈 Which colour of light is strongest in rgb(22, 90, 216)? (a) red (b) green (c) blue
- 25.🌈 Which colour of light is strongest in rgb(5, 190, 123)? (a) blue (b) green (c) red
- 26.🌈 Which colour of light is strongest in rgb(131, 214, 47)? (a) green (b) red (c) blue
- 27.🌈 In #d50000 the red part is the hex number d5. What is it as a normal number?
- 28.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(181, 76, 118)? (a) red (b) green (c) blue
- 30.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #00ffff
- 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) white (d) black
- 33.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
- 34.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) red (d) magenta
- 35.🌈 Which colour is #ffff00? (a) blue (b) bright green (c) magenta (d) yellow
- 36.🌈 In #000f00 the green part is the hex number 0f. What is it as a normal number?
- 37.🌈 In #000072 the blue part is the hex number 72. What is it as a normal number?
- 38.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
- 39.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 40.🌈 Which colour of light is strongest in rgb(160, 96, 122)? (a) blue (b) red (c) green
Answer key
- 255
- #ff00ff
- red
- red
- blue
- #00ff00
- red
- 85
- #ff0000
- blue
- #000000
- bright green
- green
- 187
- #ffffff
- 35
- black
- 8
- yellow
- magenta
- black
- white
- bright green
- blue
- green
- green
- 213
- 235
- red
- #0000ff
- 3
- cyan
- 100
- cyan
- yellow
- 15
- 114
- 185
- F
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids