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) 100 (b) 1000 (c) 99 (d) 255
- 2.🌈 Which colour is #00ff00? (a) blue (b) black (c) bright green (d) magenta
- 3.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) yellow (d) red
- 4.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) magenta (c) blue (d) black
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 6.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
- 7.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) cyan (d) red
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 9.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) yellow (d) white
- 10.🌈 Which hex code is yellow? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ffff00
- 11.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffff00
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 14.🌈 Which colour is #ffff00? (a) yellow (b) cyan (c) black (d) red
- 15.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
- 16.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) white (c) red (d) cyan
- 17.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) yellow (d) white
- 18.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #00ffff
- 19.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) blue (d) red
- 20.🌈 Which colour of light is strongest in rgb(196, 104, 83)? (a) blue (b) green (c) red
- 21.🌈 Which colour is #000000? (a) bright green (b) red (c) black (d) blue
- 22.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) black (d) red
- 23.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(186, 25, 6)? (a) green (b) blue (c) red
- 25.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) black (d) yellow
- 26.🌈 Which colour of light is strongest in rgb(92, 44, 246)? (a) red (b) green (c) blue
- 27.🌈 Which colour of light is strongest in rgb(131, 178, 13)? (a) green (b) red (c) blue
- 28.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) cyan (d) blue
- 29.🌈 Which colour of light is strongest in rgb(83, 229, 105)? (a) red (b) green (c) blue
- 30.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
- 31.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
- 32.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) cyan (c) red (d) black
- 34.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ff0000
- 35.🌈 In #00ed00 the green part is the hex number ed. What is it as a normal number?
- 36.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) magenta (d) white
- 37.🌈 In #650000 the red part is the hex number 65. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(122, 239, 21)? (a) red (b) blue (c) green
- 39.🌈 Which hex code is black? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #0000ff
- 40.🌈 Which colour of light is strongest in rgb(23, 194, 72)? (a) blue (b) green (c) red
Answer key
- 255
- bright green
- yellow
- blue
- blue
- 249
- red
- red
- white
- #ffff00
- #00ffff
- F
- 3
- yellow
- 85
- cyan
- magenta
- #ff00ff
- bright green
- red
- black
- red
- 190
- red
- cyan
- blue
- green
- magenta
- green
- 128
- 155
- 211
- black
- #ff0000
- 237
- white
- 101
- green
- #000000
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids