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) 255 (c) 1000 (d) 99
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 3.🌈 Which colour of light is strongest in rgb(171, 112, 28)? (a) green (b) blue (c) red
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 5.🌈 Which colour of light is strongest in rgb(35, 209, 94)? (a) blue (b) green (c) red
- 6.🌈 Which colour is #ffffff? (a) white (b) cyan (c) yellow (d) black
- 7.🌈 Which colour is #ff0000? (a) black (b) cyan (c) red (d) magenta
- 8.🌈 Which colour is #0000ff? (a) blue (b) black (c) bright green (d) magenta
- 9.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
- 10.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ff0000
- 11.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) yellow (d) blue
- 12.🌈 Which colour is #00ff00? (a) black (b) bright green (c) white (d) blue
- 13.🌈 Which colour is #ff00ff? (a) magenta (b) blue (c) yellow (d) black
- 14.🌈 Which colour is #00ffff? (a) black (b) cyan (c) blue (d) yellow
- 15.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) magenta (d) blue
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 17.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
- 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 19.🌈 Which colour of light is strongest in rgb(126, 166, 111)? (a) red (b) green (c) blue
- 20.🌈 Which colour is #ffff00? (a) yellow (b) white (c) cyan (d) magenta
- 21.🌈 In #00009c the blue part is the hex number 9c. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(127, 177, 101)? (a) red (b) blue (c) green
- 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(187, 65, 123)? (a) red (b) green (c) blue
- 25.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
- 26.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
- 27.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) black (c) red (d) bright green
- 28.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ff0000
- 29.🌈 Which colour of light is strongest in rgb(37, 231, 22)? (a) blue (b) green (c) red
- 30.🌈 Which colour of light is strongest in rgb(38, 20, 192)? (a) green (b) blue (c) red
- 31.🌈 In #00e000 the green part is the hex number e0. What is it as a normal number?
- 32.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) blue (d) white
- 33.🌈 Which colour of light is strongest in rgb(79, 246, 114)? (a) blue (b) green (c) red
- 34.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?
- 35.🌈 Which colour is #000000? (a) white (b) red (c) black (d) cyan
- 36.🌈 Which colour of light is strongest in rgb(40, 254, 5)? (a) green (b) blue (c) red
- 37.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 38.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffff00
- 39.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(40, 239, 64)? (a) green (b) blue (c) red
Answer key
- 255
- red
- red
- blue
- green
- white
- red
- blue
- 74
- #000000
- cyan
- bright green
- magenta
- cyan
- blue
- 3
- 152
- F
- green
- yellow
- 156
- green
- 190
- red
- 233
- 127
- bright green
- #00ffff
- green
- blue
- 224
- yellow
- green
- 224
- black
- green
- 132
- #00ff00
- 130
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids