{"id":1270,"date":"2022-01-19T15:46:15","date_gmt":"2022-01-19T15:46:15","guid":{"rendered":"https:\/\/csee.bangor.ac.uk\/?p=1270"},"modified":"2022-01-19T15:46:15","modified_gmt":"2022-01-19T15:46:15","slug":"create-colour-blocks-per-value-introduction-to-mapping-data-to-colours","status":"publish","type":"post","link":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/","title":{"rendered":"Create colour blocks per value &#8211; introduction to mapping data to colours"},"content":{"rendered":"\n<!-- Custom post code :: Pure CSS Rainbows -->\n<!-- Adds prettyprint for code snippets -->\n\n  code { background-color: rgba(0,0,0,.05); }\n  .linenums { color: #aaa; }\n  .linenums li {\n    list-style-type: decimal !important;\n    font-size: 12pt;\n    margin-top: 0px;\n  }\n  .linenums li:nth-child(even) { background: transparent !important; }\n  .wp-block-image { text-align: center !important; }\n  .wp-block-image img { display: inline; }\n\n\n\n\n\n<p>These set of exercises help you to think about colour as value. When creating a data-visualisation, values from the data need to be mapped to different visual artefacts. One way is to map the values to colour. In these activities we will create some coloured value blocks, and investigate <em>colour intervals<\/em>. We will use Processing.org and output the images into PDFs that can be printed.<\/p>\n\n\n\n<p>The activities develop from previous ones. So take a look at the following activities:<\/p>\n\n\n\n<ol><li><a href=\"https:\/\/csee.bangor.ac.uk\/project-rainbow\/introduction-to-rainbows-and-colours\/\">Rainbows and Colours<\/a> (which gives an introduction to colours).<\/li><li>The activity to&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/csee.bangor.ac.uk\/project-rainbow\/using-the-critical-thinking-sheet\/\" target=\"_blank\">make a quick sketch before you code<\/a>, introduces the Critical Thinking Sheet. You can find a copy of the <a href=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2020\/05\/CTS-Bangor-v1-2.pdf\">CTS sheet here<\/a>.<\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/csee.bangor.ac.uk\/project-rainbow\/learn-hue-saturation-and-brightness-hsb-colour-coding\/\" target=\"_blank\">Hue Saturation Brightness<\/a> activity goes through the HSB colour space.<\/li><li>And finally, the activity titled &#8220;<a href=\"https:\/\/csee.bangor.ac.uk\/project-rainbow\/learn-about-the-relative-nature-of-colour\/\">Learn about the relative nature of colour<\/a>&#8221; goes over the ideas that we&#8217;ll cover in this post.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Activity 1. Blocks of colour, representing different values<\/h2>\n\n\n\n<p><strong><span class=\"has-inline-color has-accent-color\">In this activity we will create a set of coloured blocks representing different values<\/span>.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1. plan the picture<\/h3>\n\n\n\n<p>As with previous activities, we suggest you plan the picture. It is much easier to create code when you have sketched a picture of what you are heading towards. <\/p>\n\n\n\n<p>The idea is to create a set of rectangles that show coloured blocks. These will range from 100% to 0. In other words, we have 10 coloured blocks, plus the 0 valued block. Your sketch (with functional labels) could look like the below image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"783\" src=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign-1024x783.jpg\" alt=\"Sketch of design for the blocks of value activity\" class=\"wp-image-1272\" srcset=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign-1024x783.jpg 1024w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign-300x229.jpg 300w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign-768x587.jpg 768w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign-1536x1175.jpg 1536w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg 1569w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Sketch of design for the blocks of value activity<\/figcaption><\/figure>\n\n\n\n<p>Now complete the other parts of the Critical Thinking Sheet. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-medium is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-221x300.jpg\" alt=\"Critical Thinking Sheet of the value blocks activity\" class=\"wp-image-1273\" width=\"329\" height=\"446\" srcset=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-221x300.jpg 221w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-754x1024.jpg 754w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-768x1043.jpg 768w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value.jpg 1056w\" sizes=\"(max-width: 329px) 100vw, 329px\" \/><figcaption>Example Critical Thinking Sheet of the value blocks activity<\/figcaption><\/figure><\/div>\n\n\n\n<ol><li>If you have not done so already: print out the&nbsp;<a href=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2020\/06\/CTS-Bangor-v1-2.pdf\">Critical Thinking Sheet<\/a>. Complete the problem, name and add today\u2019s date, and explain the challenge part \u2460&nbsp;<\/li><li>In panel \u2461 make a sketch of the problem output, and annotate the diagram.<\/li><li>In panel \u2462 you can explain the main components of the system. In this challenge there are three main aspects: (i) the shape that we will plot, (ii) the colour that it will be, and (iii) the position we will place it in.<\/li><li>In panel \u2463 we can now explain the process (algorithm). <\/li><li>Finally, consider what to do next. Definitely we need to think more about the colour model (HSB), how to print in PDF and move down the page.<\/li><\/ol>\n\n\n\n<p>We can break the code into firther steps. <\/p>\n\n\n\n<ul><li>We need to setup the page, colour model used, and size of workspace. <\/li><li>We need to place one set of coloured rectangles; to make sure <\/li><li>We can then place each of the other sets of coloured rectangles.<\/li><li>Finally define the PDF output.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2. Setup the page and colour model<\/h3>\n\n\n\n<figure class=\"wp-block-pullquote alignright is-style-solid-color\"><blockquote><p>Top Tip.<br>Try to remember specific<br>colour combinations. <br>Black, Yellow, Red, and so on<\/p><\/blockquote><\/figure>\n\n\n\n<p>By now we should be able to do this easily. We need to define the <code>size(..) <\/code>of the page, and the <code>colourMode(..)<\/code>. Because we have 11 blocks of colour, and will be doing it six times down the page, we can work out the size. Let us assume that each block is 40 by 40, we can calculate the size to be <code>size(440,240;)<\/code>. Also, for convenience of coding, let us choose the HSB colour model, and set each part of the model (<em>hue<\/em>, <em>saturation<\/em> and <em>value)<\/em> to 100. This will mean we can use the loop-variable *10 to give us the colour value, and loop-variable * 40 for the position. <\/p>\n\n\n\n<p>In addition, let us turn off the stroke and set the background white. <\/p>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>size(440, 240);\nnoStroke();\nbackground(255);\ncolorMode(HSB, 100, 100, 100);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3. Place one set of rectangles.<\/h3>\n\n\n\n<p>Let&#8217;s add the rectangles to the code. Remember from before (e.g., the <a href=\"https:\/\/csee.bangor.ac.uk\/project-rainbow\/create-a-coloured-grid-in-processing\/\">coloured grid exercise<\/a>), and how we thought about the grid and coordinate system. In this case, it is easy, as we only want to control the x positions along the page, because the y values are fixed width). Let&#8217;s start with the grey rectangles.<\/p>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>\/\/grey colour values, change hue (grey)\nfor(int i=0; i&lt;11; i++){\n  fill(i*10); \n  rect(i*40,0,40,40);\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4. Place 5 more sets of rectangles<\/h2>\n\n\n\n<p>The next stage is to place each of the rectangles. First, though, we need to move down the page. We know that the rectangles were 40 by 40, so we need to move down the page by a value of 40. We can use translate to do this step.<\/p>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>translate(0,40); \/\/ move down the page by 40<\/code><\/pre>\n\n\n\n<p>So we have a group of coloured blocks, followed by the translate command.<\/p>\n\n\n\n<p>For the first block, change the <strong>hue<\/strong>. For the next three blocks change the <strong>saturation<\/strong> (of red, orange and yellow). For the sixth set of blocks, change the <strong>value<\/strong>. <\/p>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>\/\/grey colour values, change hue (grey)\nfor(int i=0; i&lt;11; i++){\n  fill(i*10);\n  rect(i*40,0,40,40);\n}\n\n\/\/ Rainbow colour blocks, change hue\ntranslate(0,40);\nfor(int i=0; i&lt;11; i++){\n  fill(i*10,100,100);  \n  rect(i*40,0,40,40);\n}\n\n\/\/ Red to white colour blocks, change saturation\ntranslate(0,40);\nfor(int i=0; i&lt;11; i++){\n  fill(0,100-i*10,100);  \n  rect(i*40,0,40,40);\n}\n\n\/\/ and so on<\/code><\/pre>\n\n\n\n<p>Now try to make them appear as the picture. You will need to have some start from 100% and others from 0%.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/blocks-of-colour-of-value.png\" alt=\"Blocks of colour from value\" class=\"wp-image-1283\" width=\"612\" height=\"337\" srcset=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/blocks-of-colour-of-value.png 440w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/blocks-of-colour-of-value-300x164.png 300w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><figcaption>Blocks of colour from value<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6. Add in the PDF print<\/h3>\n\n\n\n<p>The final stage is to add in the commands to output the screen to PDF. There are some nice instructions on the Processing.org website, have a look at <a href=\"https:\/\/processing.org\/tutorials\/print\">PRINT by Casey Reas<\/a>. Following the exercise &#8220;Example 2: Render to screen, export to PDF&#8221; the instructions are simple. We need three things:<\/p>\n\n\n\n<ol><li>Import the PDF libraries:<br><code>import processing.pdf.*;<\/code><\/li><li>Start the PDF print, and choose a file name: <code>beginRecord(PDF, \"line.pdf\");<\/code><\/li><li>Finally, end the recording:<br><code>endRecord();<\/code><\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>import processing.pdf.*;\n\nsize(440, 240);\nbeginRecord(PDF, \"line.pdf\");   \/\/ Start writing to PDF\n\nnoStroke();\nbackground(255);\ncolorMode(HSB, 100, 100, 100);\n\n\/\/grey colour values, change hue (grey)\nfor(int i=0; i&lt;11; i++){\n  fill(i*10);\n  rect(i*40,0,40,40);\n}\n\n\/\/ and the rest of the coloured blocks go here\n\/\/ ...\n\nendRecord();<\/code><\/pre>\n\n\n\n<p>The screen will be recorded in the &#8220;<code>line.pdf<\/code>&#8221; file that is located in the Sketch folder of Processing.org.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Activity 2. Mapping these colours against an array of values<\/h2>\n\n\n\n<p>Now we have the basic code, we can extend it. What we want is to plot the same data in each of the sets of colours; in hue, grey, red, orange, yellow and blue-value.<\/p>\n\n\n\n<p>In order to achieve this, we need to create a data store. We will use an array. Let&#8217;s use a fixed array and set the values in three parts, as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>int myDataArray&#091;] = {0,1,2,3,7,6,5,4,8,9,10};<\/code><\/pre>\n\n\n\n<p>Now wherever we defined the colour, we can do the same, but from <code>myDataArray[]<\/code>. Therefore the colour hue, red and yellow will be:<\/p>\n\n\n\n<pre class=\"wp-block-code prettyprint linenums\"><code>\/\/ Rainbow colour blocks, change hue\nfill(myDataArray&#091;i]*10,100,100);  \n\n\/\/ Red to white colour blocks, change saturation\nfill(0,100-myDataArray&#091;i]*10,100);  \n\n\/\/ Yellow to white colour blocks\nfill(20,100-myDataArray&#091;i]*10,100);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/blocks-of-colour-of-value-from-dataArray.png\" alt=\"Blocks of colour, with values taken from the array\" class=\"wp-image-1290\" width=\"596\" height=\"325\" srcset=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/blocks-of-colour-of-value-from-dataArray.png 437w, https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/blocks-of-colour-of-value-from-dataArray-300x163.png 300w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><figcaption>Blocks of colour, with values taken from the array<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Think about mapping<\/h2>\n\n\n\n<p><strong>Let us first think about the mapping of the data. <\/strong><\/p>\n\n\n\n<p>In these exercises we have mapped data (stored in our <code>myDataArray<\/code>) to colours. We have allocated low values to a low saturation, and high values to a high saturation. We have mapped this in a linear way. The values are proportionally allocated to colour attributes. This is the same as considering percentages. Indeed, we made our lives easier by setting the attributes of the HSB colour model to 0..100, and the data values to proportions of 100.<\/p>\n\n\n\n<p>Obviously if we have different colour ranges we need to map the colours into these ranges (e.g., if we use 360 degrees for colour hue, we need to map into 360). Or if we have different ranges in our data, we need to map them appropriately.<\/p>\n\n\n\n<p><strong>Let us now look at the results a little deeper.<\/strong><\/p>\n\n\n\n<p>From these screen shots, it is clear that there are three parts to the data. Some of these transitions are easier to observe in some colour attribute mappings. For instance, it is easier to see the ranges in red and orange, and possibly also grey. But the data is more challenging to perceive in yellow, and in a black-value change (the last blue line). They are also difficult to observe in the sets of rainbow colour blocks.<\/p>\n\n\n\n<p>Different colours appear in brilliance. For instance, a pure saturated yellow is very light. It is not possible to get a dark yellow. Whereas saturated blue is very dark (as can be seen from the pictures).When red is dark we can see a vivid colour, while when it is lightened it loses its radiance. In addition, the rainbow colour map shows that the high value [10] and low value [0] have the same colour, which can be problematic when trying to understand maximum and minimum values from a dataset.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Go further<\/h2>\n\n\n\n<ol><li>Try to change the data. <\/li><li>Perhaps create a 2D dataset, and plot the following values.<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>0,1,2,3,7,6,5,4,8,9,10\n1,2,3,7,6,5,4,8,9,10,0\n2,3,7,6,5,4,8,9,10,0,1\n2,3,7,6,5,4,8,9,10,0,1\n1,2,3,7,6,5,4,8,9,10,0\n0,1,2,3,7,6,5,4,8,9,10<\/code><\/pre>\n\n\n\n<ol start=\"3\"><li>Investigate different hue mappings.<\/li><li>Make the data grid much smaller, and plot many more points of data.<\/li><\/ol>\n\n\n\n<p>Also, take a look at the problems with the rainbow colour map. There are some interesting articles, such as the following<\/p>\n\n\n\n<ul><li> <a href=\"https:\/\/www.computer.org\/csdl\/magazine\/cg\/2007\/02\/mcg2007020014\/13rRUxYrbOE\">Rainbow Color Map (Still) Considered Harmful<\/a> (Borland and Taylor II)<\/li><li><a href=\"https:\/\/eagereyes.org\/basics\/rainbow-color-map\">How the rainbow colour map misleads<\/a> (Kosara)<\/li><li><a href=\"http:\/\/How rainbow colour maps can distort data and be misleading\">How rainbow colour maps can distort data and be misleading<\/a> (Heron, Crameri, Shephard)<\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create blocks of data that represent values. Then map these blocks from a simple array.<\/p>\n","protected":false},"author":2,"featured_media":1272,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,10,16,17],"tags":[23,39,45,48,54,66,68,82,83,89,97,100,117,121,127],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create colour blocks per value - introduction to mapping data to colours - Project Rainbow<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create colour blocks per value - introduction to mapping data to colours - Project Rainbow\" \/>\n<meta property=\"og:description\" content=\"Create blocks of data that represent values. Then map these blocks from a simple array.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\" \/>\n<meta property=\"og:site_name\" content=\"Project Rainbow\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-19T15:46:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1569\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"projectrainbow\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"projectrainbow\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\"},\"author\":{\"name\":\"projectrainbow\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/person\/fa50357aa55dc7c9e38a6114bf64f1f6\"},\"headline\":\"Create colour blocks per value &#8211; introduction to mapping data to colours\",\"datePublished\":\"2022-01-19T15:46:15+00:00\",\"dateModified\":\"2022-01-19T15:46:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\"},\"wordCount\":1389,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#organization\"},\"image\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg\",\"keywords\":[\"array\",\"colour interval\",\"colours\",\"critical thinking sheet\",\"data\",\"hsb\",\"hue\",\"map values\",\"mapping\",\"PDF\",\"print to PDF\",\"processing.org\",\"saturation\",\"sketch\",\"value\"],\"articleSection\":[\"Beginner\",\"Colours\",\"Data\",\"Processing\",\"Project Rainbow\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\",\"url\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\",\"name\":\"Create colour blocks per value - introduction to mapping data to colours - Project Rainbow\",\"isPartOf\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg\",\"datePublished\":\"2022-01-19T15:46:15+00:00\",\"dateModified\":\"2022-01-19T15:46:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage\",\"url\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg\",\"contentUrl\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg\",\"width\":1569,\"height\":1200,\"caption\":\"Sketch of design for the blocks of value activity\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create colour blocks per value &#8211; introduction to mapping data to colours\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#website\",\"url\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/\",\"name\":\"Project Rainbow\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#organization\",\"name\":\"Project Rainbow\",\"url\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2020\/05\/bangor_logo_c1_flush.png\",\"contentUrl\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2020\/05\/bangor_logo_c1_flush.png\",\"width\":3356,\"height\":958,\"caption\":\"Project Rainbow\"},\"image\":{\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/person\/fa50357aa55dc7c9e38a6114bf64f1f6\",\"name\":\"projectrainbow\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/221f8a462bd270b3db788cf44a3c1757?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/221f8a462bd270b3db788cf44a3c1757?s=96&d=mm&r=g\",\"caption\":\"projectrainbow\"},\"url\":\"https:\/\/csee.bangor.ac.uk\/projectrainbow\/author\/projectrainbow\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create colour blocks per value - introduction to mapping data to colours - Project Rainbow","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/","og_locale":"en_US","og_type":"article","og_title":"Create colour blocks per value - introduction to mapping data to colours - Project Rainbow","og_description":"Create blocks of data that represent values. Then map these blocks from a simple array.","og_url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/","og_site_name":"Project Rainbow","article_published_time":"2022-01-19T15:46:15+00:00","og_image":[{"width":1569,"height":1200,"url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg","type":"image\/jpeg"}],"author":"projectrainbow","twitter_card":"summary_large_image","twitter_misc":{"Written by":"projectrainbow","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#article","isPartOf":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/"},"author":{"name":"projectrainbow","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/person\/fa50357aa55dc7c9e38a6114bf64f1f6"},"headline":"Create colour blocks per value &#8211; introduction to mapping data to colours","datePublished":"2022-01-19T15:46:15+00:00","dateModified":"2022-01-19T15:46:15+00:00","mainEntityOfPage":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/"},"wordCount":1389,"commentCount":0,"publisher":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#organization"},"image":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage"},"thumbnailUrl":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg","keywords":["array","colour interval","colours","critical thinking sheet","data","hsb","hue","map values","mapping","PDF","print to PDF","processing.org","saturation","sketch","value"],"articleSection":["Beginner","Colours","Data","Processing","Project Rainbow"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/","url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/","name":"Create colour blocks per value - introduction to mapping data to colours - Project Rainbow","isPartOf":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#website"},"primaryImageOfPage":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage"},"image":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage"},"thumbnailUrl":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg","datePublished":"2022-01-19T15:46:15+00:00","dateModified":"2022-01-19T15:46:15+00:00","breadcrumb":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#primaryimage","url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg","contentUrl":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2022\/01\/cts-blocks-of-value-SketchOfDesign.jpg","width":1569,"height":1200,"caption":"Sketch of design for the blocks of value activity"},{"@type":"BreadcrumbList","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/2022\/01\/19\/create-colour-blocks-per-value-introduction-to-mapping-data-to-colours\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/"},{"@type":"ListItem","position":2,"name":"Create colour blocks per value &#8211; introduction to mapping data to colours"}]},{"@type":"WebSite","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#website","url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/","name":"Project Rainbow","description":"","publisher":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#organization","name":"Project Rainbow","url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/logo\/image\/","url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2020\/05\/bangor_logo_c1_flush.png","contentUrl":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-content\/uploads\/sites\/2\/2020\/05\/bangor_logo_c1_flush.png","width":3356,"height":958,"caption":"Project Rainbow"},"image":{"@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/person\/fa50357aa55dc7c9e38a6114bf64f1f6","name":"projectrainbow","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/221f8a462bd270b3db788cf44a3c1757?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/221f8a462bd270b3db788cf44a3c1757?s=96&d=mm&r=g","caption":"projectrainbow"},"url":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/author\/projectrainbow\/"}]}},"_links":{"self":[{"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/posts\/1270"}],"collection":[{"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/comments?post=1270"}],"version-history":[{"count":0,"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/posts\/1270\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/media\/1272"}],"wp:attachment":[{"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/media?parent=1270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/categories?post=1270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csee.bangor.ac.uk\/projectrainbow\/wp-json\/wp\/v2\/tags?post=1270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}