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(161, 16, 108)? (a) blue (b) green (c) red
- 2.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) blue (c) bright green (d) white
- 3.🌈 Which colour of light is strongest in rgb(15, 32, 211)? (a) red (b) blue (c) green
- 4.🌈 Which colour of light is strongest in rgb(29, 28, 185)? (a) blue (b) red (c) green
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 6.🌈 In #000088 the blue part is the hex number 88. What is it as a normal number?
- 7.🌈 Which colour is #00ffff? (a) white (b) red (c) black (d) cyan
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 9.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) blue (c) magenta (d) black
- 10.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) red (d) bright green
- 11.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) black (d) magenta
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 13.🌈 Which hex code is bright green? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ff00
- 14.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #ff00ff
- 15.🌈 Which colour is #ffff00? (a) magenta (b) black (c) yellow (d) cyan
- 16.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
- 17.🌈 In #000085 the blue part is the hex number 85. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) magenta (c) yellow (d) red
- 19.🌈 Which colour of light is strongest in rgb(223, 23, 94)? (a) red (b) blue (c) green
- 20.🌈 Which colour of light is strongest in rgb(180, 129, 89)? (a) red (b) green (c) blue
- 21.🌈 Which colour of light is strongest in rgb(207, 31, 21)? (a) green (b) red (c) blue
- 22.🌈 Which colour is #00ff00? (a) cyan (b) blue (c) red (d) bright green
- 23.🌈 Which colour of light is strongest in rgb(119, 9, 176)? (a) green (b) red (c) blue
- 24.🌈 Which colour of light is strongest in rgb(34, 152, 122)? (a) green (b) blue (c) red
- 25.🌈 Which colour of light is strongest in rgb(88, 237, 113)? (a) green (b) blue (c) red
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
- 27.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #000000 (d) #ff00ff
- 28.🌈 Which hex code is blue? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #0000ff
- 29.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) bright green (c) white (d) yellow
- 30.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 31.🌈 In #310000 the red part is the hex number 31. What is it as a normal number?
- 32.🌈 Which colour is #000000? (a) cyan (b) red (c) black (d) yellow
- 33.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) red (c) blue (d) white
- 34.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
- 35.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(101, 98, 243)? (a) red (b) blue (c) green
- 37.🌈 Which colour of light is strongest in rgb(46, 178, 132)? (a) green (b) red (c) blue
- 38.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
- 39.🌈 In #900000 the red part is the hex number 90. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(214, 16, 97)? (a) red (b) green (c) blue
Answer key
- red
- white
- blue
- blue
- 3
- 136
- cyan
- F
- black
- bright green
- blue
- 255
- #00ff00
- #ffffff
- yellow
- 202
- 133
- red
- red
- red
- red
- bright green
- blue
- green
- green
- red
- #ff0000
- #0000ff
- yellow
- blue
- 49
- black
- blue
- 247
- 9
- blue
- green
- 87
- 144
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids