Exponents Project: Colour Wheel

Introduction

This task is about translating the hexadecimal code used in html for colours. ‘Hexadecimal’ means ‘written in base 16’.

When creating a colour scheme for a website, one method is to use different quantities of red, green and blue to create the perfect colour. On geogebra, we can select colours by choosing the ratio of red, green, blue. Here is a screenshot:

Notice that there are 256 parts of each colour (include the ‘0’). Its important in this project to know that 256 = 16^2.

Here is a screen shot of the brown wheel we begin with in this project.

Notice, the default brown colour is made up of 153 Red, 51 Green, 0 Blue and has the html name #993300. The html name is made up of three hexadecimal values.

The Project

As you can see from the screenshots above, colours in geogebra are input using red, green, blue ratios; however the hexadecimal name is also given.

There are four steps to the project:

  • First, let’s do the colouring, and take note of the colours used in hexadecimal code (the number in brackets that begins with a #).You can print out Colour Wheel Notes to record your colours. Use at least three different colours in your design. Take a screenshot to save your design.
  • Next, we’ll discuss how to understand and to write numbers in different bases.
  • Third, hand over your design to a partner/another group to translate your hexadecimal code.
  • Translate the hexadecimal code given to you and reproduce your partner’s design.

Watch this ‘how to video’ on colouring with the applet.

Here’s the applet:

 

Remember to take a screen shot to save your colour wheel (on Mac, use command shift 4; on PC, search for the ‘snipping tool’). Now put your colour wheel aside and do the following research on number bases. We’ll get back to your colour wheel at the end of this page.

Basics – writing numbers in base 10

Thanks to the Chinese, Hindu and Arabic mathematicians of ancient history, we generally name our numbers after powers of 10. One thousand is  10^3. One hundred is 10^2. We count in these powers, however we are so familiar with them we don’t really notice it.

Take the number 3\,457 – three thousand, four hundred and fifty seven. We can write it as:

    \[3 \times 1000 + 4 \times 100 + 5 \times 10 + 7 \times 1\]

or,

    \[3 \times 10^3 + 4 \times 10^2 + 5 \times 10^1 + 7 \times 10^0\]

We multiply the powers of ten with only the digits \{0,1,2,3,4,5,6,7,8,9\}. After we reach the number 9, we move into a new power of 10.

As another example, the number 5\,400\,205 can be written as:

    \[5 \times 10^6 + 4 \times 10^5 + 0 \times 10^4 + 0 \times 10^3 + 2\times 10^2 + 0 \times 10^1 + 5 \times 10^0\]

Notice the use of 10^0 (which we know is equal to one) to write the ‘units’ and to maintain the pattern.

Short Comprehension Exercise:

  1. Write the number 764 in the form a_2 \times 10^2 + a_1 \times 10^1 + a_0 \times 10^0.
  2. Write the number 1238 in the form a_3 \times 10^3 + a_2 \times 10^2 + a_1 \times 10^1 + a_0 \times 10^0.
  3. Using your answers for parts 1 and 2, add 764 to 1238, and write your answer in the form a_3 \times 10^3 + a_2 \times 10^2 + a_1 \times 10^1 + a_0 \times 10^0

Development – writing numbers in other bases

Our first example was the number 3457. Now as we generally write in base 10, we don’t need to say that we are writing in base 10. We have said above that:

    \[3457=3 \times 10^3 + 4 \times 10^2 + 5 \times 10^1 + 7 \times 10^0\]

However, if we were writing in base 8, we would say so by some notation. We might say it with a subscript such as

    \[3457_{\textbf{8}}\]

This number would have the following meaning:

    \[3457_{\textbf{8}}=3 \times 8^3 + 4 \times 8^2 + 5 \times 8^1 + 7 \times 8^0\]

After a little calculation, we find that this is 1839 in base 10.


Number sense question:

Which is bigger,

    \[432_{\textbf{10}}\]

or

    \[432_{\textbf{8}}?\]


Binary: Writing numbers in base 2

When writing in base 10, we use the digits \{0,1,2,3,4,5,6,7,8,9\} along with powers of 10.

When writing in base 8, we use the digits \{0,1,2,3,4,5,6,7\} along with powers of 8.

When writing in base 2, we use the digits \{0,1\} only, along with powers of 2.

Whichever base we use allows us to represent every integer.

When writing in base 2 it is helpful to know powers of 2 (see here ENFM Solutions for a refresher).

Example 1

Let’s take the base 10 number 300 and write it in base 2.

We know that 2^8 = 256. We are left with 300 - 256 = 44.

We know that 2^5 = 32. We are left with 44 - 32 = 12.

We know that 2^3 =8. We are left with 12 - 8 = 4. Now, 2^2 = 4.

Check: 256 + 32 + 8 + 4 = 300 \checkmark.

In other words, 2^8 + 2^5 + 2^3 + 2^2 = 300.

So we can write: 300= 100101100_2

The first ‘1’ on the left is for the 2^8. Then zeros for 2^7, 2^6, then 1 for 2^5 etc until you get to the last two zeros – they are for no 2^1 and 2^0.

Example 2

Let’s translate the base 2 number: 1\,1\,0\,0\,0\,1_2 to base 10.

We have to remember that the first place on the right is the number of 2^0, not 2^1.

Therefore the highest power of 2 in this example is 2^5. We have:

    \[1\,1\,0\,0\,0\,1_{\textbf{2}}=1\times2^5+1\times2^4+0\times 2^3+0 \times 2^2 + 0 \times 2^1 + 1 \times 2^0=32+16+1=49\]

Short Comprehension Exercise:

  1. What is the number 1\,1\,1_2 in base 10?
  2. What is the number 1\,0\,0\,1_2 in base 10?
  3. Write the number 55 in base 2.
  4. Write the year you were born in base 2.

Goal – writing numbers in base 16

When writing in base 16, we use the digits \{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\} along with powers of 16.

Now the problem is, the numbers 10,11,12,13,14,15 are all two digit which can get confusing. So we have a genius plan of giving those numbers letter names. Instead of 10, we write ‘A’, instead of 11, we write ‘B’ etc. Therefore, in base 16 we use the ‘digits’: \{0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F\}

Example 1: Let’s write the base 10 number 123 in base 16.

Now we can’t get a 16^2 out of 123, because 16^2 is too high. We’ll have to figure out how many 16^1 we get, and what’s left.

Now 16 \times 7=112, and leaves us with 11 left. So we have:

16^2  16^1  16^0
 0  7  11

We have

    \[123=7 \times 16^1+11\times 16^0\]

.

Therefore the number 123 is equal to 7,11 in base 16, or better: 7 \,B_{16}.

Example 2: The colour #FA 80 72 is also known as ‘salmon’. Let’s translate it to base 10 to find the Red, Green, Blue parts.

The Red part is [F A]_{16}. Now F stands for 15; A stands for 10. So we have 15 \times 16^1 + 10 \times 16^0 = 240 + 10 = 250.

The Green part is [8 0]_{16}. That is, 8 \times 16^1 + 0 \times 16^0 = 128.

The Blue part is [7 2]_{16}. That is, 7 \times 16^1 + 2 \times 16^0 = 112+2=114

Click here to type in those three values: 250 Red; 128 Yellow; 114 Blue, to see the colour!

Back to the Project

Now that you can translate the # numbers for colours, go ahead and swap your colour wheel design with another group. Translate their code, and reproduce their colour wheel.


Return to Exponents Menu