Build a Chromolabe

A Simple Pencil and Paper Computer

This article is based on an activity originally designed as a classroom micro-activity to introduce some concepts of Visualisation in Data Analysis, in a fun and interactive way. The activity is suitable for children aged 12 to 120.

I would like to thank my wife, Sharon Cave, for her invaluable assistance in developing this activity.

Most people rely on their natural human intuition for decision making, and human intuition is based on interacting with the physical world around us. Computers, on the other hand, deal in abstracts ideas; something humans just aren’t well equipped to deal with.

What goes on inside a computer’s mind is a mystery to most people. In fact, its kind of scary: you can’t see, touch, or taste it. This makes it hard to understanding what it is that programmers are doing, and therefore can be intimidating for people.

This means that programming is constrained to the realm of people with “a freakish knack for manipulating abstract symbols”. This activity is designed to help bridge that gap. We are going to build a physical computer.

Computer programmers are often faced with the daunting task of taking those abstract concepts and making them concrete for their audience; a tricky and detailed task.

One of the tools used to do this is colour.

In each of the example cases, colour is used to visualise the categorisation of ideas: time blocks in a calendar, political parties, characters in a game, we use colour everywhere to group related things together.

As a programmer, we have just come across our first problem: how do we choose the colour palette we will use in our program?

Good Palettes

There are three components to selecting a good colour palette for use in visualisations:

  1. High Differentiation
  2. Sufficient Colours
  3. Aesthetically Pleasing

Every colour palette used in a visualisation should maintain these three basic elements

Sufficient Colours

There should be enough colours to meet the needs of the visualisation.

In the early days of video games, it was often enough to have 4 different colours: one for each player. In cartography, the number of colours needed is dictated by the number of shared borders, the same colour should never touch.

“Sufficient” is different depending on what you are trying to represent.

High Differentiation

Finding food in the wilderness is a matter of survival for hunter/gatherer humans . The differentiation of colour is “built-in” in humans. [image: Wikimedia]

The colours used should be sufficiently different, that people can tell them apart. If you are trying to tell the difference between “stop” and “go” at a traffic intersection, there should be no ambiguity in which colour you are showing your audience.

This problem is complicated by internationalisation (colour means different things in different cultures), biologic issues (colour blindness), or other things.

Aesthetically Pleasing

At the end of the day, humans are the ones that will be looking at this visualisation, they should find it pleasing to look at.

Choosing colours that are “complimentary” can often have bizarre visual consequences. We need to work with the way humans are built. There is also a fashionable element to this, colours that are popular today may not be popular tomorrow.

Complimentary colours have high contrast but, when placed side-by-side, can have negative consequences. Interestingly, the pastel variants do not suffer these consequences.

Infinite Colours to Choose From

Choosing colours is difficult.

There are an infinite number of colours to choose from, but we need to choose just 4–12 colours, and those colours need to meet our three requirements.

Hard decision making is exactly what we build machines to help us with. To start building our information machine, we need to first organise everything we know, and all we know so far is a basic truth of the universe

There are a lot of colours to choose from

To help us sort through the options we need some way of organising the them. That is a key thing programmers do, they organise stuff. By organising things, we can simplify our problem.

Moses Harris, The Natural System of Colours (1776) [Wikipedia: Color Wheel]

Colour wheels have long been a tool for grouping similar colours with one another.

So we first need to narrow the set down, let’s only pick from colours humans can see.

This process can be represented with a Colour Wheel.

Colour wheels represent the variations of colours that can be made by mixing different base colours together. The base colours are placed around the outside.

While not representative of “every” colour possible, these colour wheels give us many colours to choose from. They also have the advantage of placing similar colours physically close together.

This helps us satisfy two of our requirements:

  1. Sufficient: If we need many, there are many.
  2. Differentiation: the further they are physically, the more different they are.

Mechanically Making Decisions

Narrowing down an infinite number of colours, to just the 4–6 we need, is difficult, and building a machine to choose for us is the point of the exercise. Unfortunately, describing the machine and how it works mathematically, sounds like a bunch of abstract symbol manipulation.

Rather than trying to explain it, let the demonstration be its own proof. Besides, this machine is really simple...

… like … really simple.

Building the machine is way easier than explaining it. Once you build it, it should become self evident how the colour picker works.

1. Gather your supplies

Get a pencil… sharper is better.

Print the supplementary material: the key pages are the colour-wheel, and the blank circle.

The two template images that will need to be printed from the slides.

2. Draw a Spiral

Using the blank circle, starting anywhere along the outside, begin tracing it gently with your pencil. When you have a feel for the circle, draw an evenly spaced spiral toward the middle.

3. Do the calculation

Place your pencil on the topmost tick-mark of the circle.

Now, move your pencil three steps, and mark the position:

  1. all the way across the circle, to the opposite side
  2. over one tick-mark (either way)
  3. move in one step toward the middle
  4. mark that position

Now, starting from this new position,

One of the reasons we like machines is they do repetitive tasks for us. Describing the repetitive tasks is often the real trick
  1. move all the way across to the opposite side
  2. move over one tick-mark (same direction)
  3. move in two steps toward the middle
  4. mark that position

Did you see it? The small change in the repeating pattern?

Keep moving around marking points on the chart until you work your way to the very middle.

4. Make it permanent

When you think you have all of your dots in the correct location, carefully…

(make sure you are careful, this is both delicate, and dangerous)

place your pencil over the first dot and…

(don’t mess it up: we are building computers here)

Ram that pencil through!

Seriously, don’t be gentle. Punch a good sized hole in the paper.

(just be careful not to put your hand in the way)

Do that for each of the dots you made.

Reading the Results

Align your spiral graph with the colour wheel, and watch your colour palette reveal itself. Start from the first dot and copy down each of the colours your program chose.

That is your individual colour palette to use in your visualisations.

Remember when we started, we were looking for a colour palette that satisfied three criteria:

  1. High Differentiation
  2. Sufficient Colours
  3. Aesthetically Pleasing

High Differentiation

By starting with a colour wheel, we locate similar colours physically close together. Our algorithm then travels far across to select colours that are physically far apart.

Sufficient Colours

The spiral pattern ensures that we never select the same colour twice. No matter how many colours we select, we will always have different colours.

You may notice that the differentiation of colours decreases as you approach the middle: the more colours you pick, the more similar they get. This is a compromise we need to make. It is a balance between having a lot, and having them be different.

Aesthetically Pleasing

This is always a tough one, what is pleasing to me, may not be pleasing to you.

There is no real way to have our simple computer decide whether the selected colour is pretty or not. That is something best left to humans. So take a good look at your colours, and decide if you like them or not. By luck, you may have gotten a good starting point, but maybe you didn’t.

There is one last thing you should try: poke a small hole right in the middle.

Now you can rotate the selector wheel around the colour wheel to fine tune your selection process.

Conclusion

Don’t give this as a written assignment, it was designed to be an interactive activity. Instead, deliver it as performance art. A lot of how to manipulate the paper and pencil is very obvious when demonstrated, but is very difficult to describe.

This was originally designed with a target audience of first year programming students in mind, but can easily be scaled to the elementary level (by leaving out all the theory), or scaled up to the undergrad level by asking students to mathematically define the formulas involved, or write software that implements the process.

Don’t forget that the “reveal” is part of the “fun”.

Variations

I would recommend explaining a colour wheel and colour mixing as a separate, precursor, exercise. For elementary students, have them mix paint. For high school students, have them physically make their own colour wheel with pencil crayons or water colour. For undergrad programming students, have them create a colour wheel programmatically.

The perfect combination activities (in my fanatasy world) would be for students to build a colour wheel in their art or physics class, construct the selector wheel in maths class, and use the resulting colours in charts constructed for their civics class. All of it should be hand drawn to maximise comprehension.

A natural extension of this activity is to write a function (programmatic or algebraic) to pick the colour. This would require students to define the colour wheel space, as well as traverse the space in a spiral. HTML colour codes based on RGB make a good return value.

If you really wanted a challenge, move into a more complete 3 dimensional colour-space. RGB defines three dimensions: define a function that selects from a colour sphere, with a 3 dimensional spiral search of the space…

hmm…

Even I’m not sure how to do that.

Further Reading

While this represents one way to select a colour palette, it is not necessarily the best. Have a look at some other considerations:

When I came up with the idea for constructing this contraption, I had two other works in mind

  • Astrolabe: a computer from the first century, developed in Alexandria
  • There is an article I can no longer find. It used a phi based spiral to select colours from a colour map for use in web based video games. Please leave a comment if you know of the article.

If you are looking for a digital variation of this tool

Though I suspect building it yourself would be more fun…

Finally, I would like to thank Sharon Cave for her help with this activity. I am grateful for her effort both in helping with my teaching and as my wife.

Tips For Teachers

  1. As an introduction, promise students that in the next 30 minutes they are going build their first computer program.
  2. Don’t have students cut-out the circles. By keeping them on the page, you imply “no rotation”. This delays discovery long enough for you to suggest it as “intentional thought”.
  3. Students will have different “tightness” of their spirals. This is a hint as to the trade-off between high differentiation, and more colours.
  4. There will be the student that is tentative about punching a hole in their paper. The hole needs to be big enough that the colour shows through. Encouraging the student to be a little rough with it gets a couple of chuckles.
  5. Have the students (as a group) describe how their computer meets the three criteria that were laid out.
  6. Ignore the aesthetics until the very end. Inevitably a student will bring up aesthetics. Act surprised… like you forgot about it. Then hold up your demo and rotate it. If you don’t like the palette you got, turn it to select a different palette.
  7. Like any activity, leave this to the end of the class. The excitement caused by comparing colour schemes brings the class to an end. Expect to do no more than have students take a written handout on the way out the door.
  8. At the beginning, you drew a spiral. This was not strictly necessary. Really, you should do this using Radial Coordinate graphs (on paper), or a continuous formula. The act of counting across, and in, was the real spiral algorithm.

Activity Plan

Skills

Algorithmic Thinking

Problem definition

Learning Objectives

  • Describe the use of colour in categorisation
  • Describe the components of a good colour palette
  • Apply the components of a good colour palette

Audience

  • Grades 7 — Undergraduate
  • Introductory programming students
  • Introductory data analysis students

Materials

  • Colour Wheel: Make one, or print the templates
  • Radial graph: must be same size as colour wheel
  • Pencil: must be sharp

Progression

  1. Learn the three components of a good colour palette (~5 min)
  2. Construct a colour selector (~5 min)
  3. Reflect

Steps

  1. Gather Supplies (pencil/printouts)
  2. All the way across, 1 over, step in, Repeat until full
  3. Punch Holes
  4. Select colors, record by colouring in grid

Reflection/Assessment

  • What changes could you make to get even more colours?
  • What happens to differentiation as you get more colours?
  • What decision making inputs can you control on the machine?
  • How can you change the colours if they aren’t aesthetically pleasing?

Having discovered a passion for business data analysis in my teens, I love to share the beauty of data and complex systems with other devs and clients alike.