{"id":14,"date":"2017-01-02T17:45:03","date_gmt":"2017-01-02T17:45:03","guid":{"rendered":"http:\/\/learnlearn.uk\/binary\/?page_id=14"},"modified":"2022-11-08T11:34:18","modified_gmt":"2022-11-08T11:34:18","slug":"color-image-representation-binary","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/","title":{"rendered":"Color image representation in binary"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Starter<\/h2>\n<div class=\"tabcontent\">\n\n<p><iframe loading=\"lazy\" src=\"https:\/\/learnlearn.uk\/wp-content\/uploads\/2022\/10\/rgbgame.html\" width=\"850\" height=\"800\"><\/iframe><\/p>\n<p>\n<\/div><h2 class=\"tabtitle\">Demo Animation<\/h2>\n<div class=\"tabcontent\">\n<br \/>\n<iframe loading=\"lazy\" src=\"\/\/scratch.mit.edu\/projects\/embed\/138532254\/?autostart=false\" width=\"100%\" height=\"600\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Creating  Colors<\/h2>\n<div class=\"tabcontent\">\n\n<div class=\"arconix-column-two-thirds\">\n<h2>Creating Colours using RGB Components<\/h2>\n<p>So far we have learnt how black &amp; white and gray-scale images are represented using binary, but what about colours?<\/p>\n<p>Well before we can look the colours are stored using binary, we need to have a look at how colours are created.<\/p>\n<p>When colours are created using light ( such as the light on your computer screen) , they are made up of a mixture or 3 colour components:<\/p>\n<div class=\"arconix-list\" data-arconix-icon=\"fa-chevron-circle-right\" data-arconix-color=\"black\"><\/div>\n<ul>\n<li>Red<\/li>\n<li>Green<\/li>\n<li>Blue<\/li>\n<\/ul>\n<div class=\"arconix-list\" data-arconix-icon=\"fa-chevron-circle-right\" data-arconix-color=\"black\"><\/div>\n<p>It is the<strong> brightness<\/strong> of each colour in the mix that creates all the colours that we use in our bitmaps!<\/p>\n<\/div>\n<div class=\"arconix-column-one-third\">\n<div id=\"attachment_38\" style=\"width: 310px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-38\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-38 size-medium\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb-300x300.png\" alt=\"Lesson 5 Color Images\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb-300x300.png 300w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb-150x150.png 150w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb-600x600.png 600w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb.png 720w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-38\" class=\"wp-caption-text\">A simple colour wheel showing the primary and secondary colours<\/p><\/div>\n<div id=\"attachment_122\" style=\"width: 310px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-122\" decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-122\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/colour-wheel-complex-300x300.png\" alt=\"A more complex colour wheel using different colour mixes\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/colour-wheel-complex-300x300.png 300w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/colour-wheel-complex-150x150.png 150w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/colour-wheel-complex.png 375w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-122\" class=\"wp-caption-text\">A more complex colour wheel using different colour mixes<\/p><\/div>\n<\/div>\n\n<\/div><h2 class=\"tabtitle\">Binary RGB Colours<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Binary RGB Colours<\/h3>\n<p>Binary RGB Colours are created using a mix of three colours, each set at a different brightness &#8211; 0 for black, 255 for 100% brightness.<\/p>\n<div class=\"arconix-list\" data-arconix-icon=\"fa-chevron-circle-right\" data-arconix-color=\"black\">\n<ul>\n<li>Red 0 to 255<\/li>\n<li>Green 0 to 255<\/li>\n<li>Blue 0 to 255<\/li>\n<\/ul>\n<div class=\"arconix-list\" data-arconix-icon=\"fa-chevron-circle-right\" data-arconix-color=\"black\"><\/div>\n<p>Although\u00a0this uses a large amount of bits (24 bits per\u00a0pixel vs 1 bit per pixel for B&amp;W), it also means that you can have a massive amount of different colors to choose from:<\/p>\n<div class=\"arconix-list\" data-arconix-icon=\"fa-chevron-circle-right\" data-arconix-color=\"black\"><\/div>\n<ul>\n<li>red x green x blue<\/li>\n<li>= 255 x 255 x 255<\/li>\n<li>= 16.7 Million possible colours!<\/li>\n<\/ul>\n<\/div>\n<p>This type of colour system is known as 24bit colour and is the system most widely used world wide!<\/p>\n<h3>Example Colours using the 24 bit colour system<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-115\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/complex-rgb-colours-fixed.png\" alt=\"complex-rgb-colours-fixed\" width=\"887\" height=\"358\" srcset=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/complex-rgb-colours-fixed.png 887w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/complex-rgb-colours-fixed-300x121.png 300w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/complex-rgb-colours-fixed-768x310.png 768w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/complex-rgb-colours-fixed-600x242.png 600w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Practice<\/h2>\n<div class=\"tabcontent\">\n\n<div class=\"arconix-column-one-half\">\n<p><strong>RGB \u00a0to color<\/strong><\/p>\n<p>a. 255,0,0<\/p>\n<p>b. 0,255,255<\/p>\n<p>c. 125,125,125<\/p>\n<p>d. 0,0,0<\/p>\n<p>e. 255,0,255<\/p>\n<\/div>\n<div class=\"arconix-column-one-half\">\n<p><strong>Color to binary<\/strong><\/p>\n<p>g. Orange<\/p>\n<p>h. Black<\/p>\n<p>i. Purple<\/p>\n<p>j. Brown<\/p>\n<\/div>\n<div class=\"arconix-column-one-half\">\n<p><strong>Stretch Challenges<\/strong><\/p>\n<p>Finished? Try these super hard challenges!<\/p>\n<p>k. 0000 0000 0000 0000 0000 0000<\/p>\n<p>l. 1111 1111 1111 1111 1111 1111<\/p>\n<p>m. 0101 1100 1100 0001 1110 1101<\/p>\n<p>n. Baby Pink ( convert to binary)<\/p>\n<\/div>\n<div class=\"arconix-column-one-half\">\n<\/div>\n\n<\/div><h2 class=\"tabtitle\">Compression<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Image Compression<\/h3>\n<p>High quality images are great, but there is a problem. As the resolution of modern cameras increases, so does the file size!<\/p>\n<p>A modern camera can take pictures of a resolution of up to 20 megapixels (20 million pixels) but this means that the image size will be massive!<\/p>\n<p><span style=\"color: #0000ff;\">20,000,000 pixels times by 24 bits per pixel = \u00a0480,000 bits \u00a0= 60 Megabytes per image.<\/span><\/p>\n<p>This\u00a0would mean that if you wanted to save your photos to a CD you could only save about 13 photos to each CD!!! Argh!!!<\/p>\n<p>This is rubbish. What we need is a way of making image files smaller &#8211; compression.<\/p>\n<p><strong>Lossless Compression ( 30 &#8211; 50 % file size reduction)<\/strong><\/p>\n<p>The first form of compression is called lossless compression. Lossless compress makes images smaller than their original size, without losing any of the details.<\/p>\n<p>TIFF is an example of a lossless file compression type.<\/p>\n<p><strong>Lossy Compression (70-95% file size reduction)<\/strong><\/p>\n<p>The second form of compression is known as<strong> lossy<\/strong> compression. These forms of compression use complex algorithms to reduce the file size in photos, whilst minimising the noticeable reduction in file quality.<\/p>\n<div id=\"attachment_120\" style=\"width: 860px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/JPEG_compression_Example.jpg\"><img aria-describedby=\"caption-attachment-120\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-120\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/JPEG_compression_Example.jpg\" alt=\"Image quality reduction caused by extreme JPEG lossy compression. Click to enlarge\" width=\"850\" height=\"638\" srcset=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/JPEG_compression_Example.jpg 1000w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/JPEG_compression_Example-300x225.jpg 300w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/JPEG_compression_Example-768x576.jpg 768w, https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/JPEG_compression_Example-600x450.jpg 600w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/a><p id=\"caption-attachment-120\" class=\"wp-caption-text\">Image quality reduction caused by too much\u00a0JPEG lossy compression. Click to enlarge<\/p><\/div>\n<p><a href=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/b\/b2\/JPEG_compression_Example.jpg\">Source : Wikipedia<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/1RZByq5i1Tej6Vo9MCoPYoXZ9Ri2uN3CU41qm2wzHX5Y\/edit?usp=sharing\">Calculating image size and compression Google Slides<\/a><\/p>\n<p><a href=\"https:\/\/play.kahoot.it\/#\/k\/fc7843cb-b752-45be-9a17-9d3a107fcefb\">Here&#8217;s the link to today&#8217;s plenary Kahoot!<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Binary RGB Colours Binary RGB Colours are created using a mix of three colours, each set at a different brightness &#8211; 0 for black, 255 for 100% brightness. This type of colour system is known as 24bit colour and is the system most widely used world wide! Example Colours using the 24 bit colour system&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Color image representation in binary<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Color image representation in binary - Binary<\/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:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Color image representation in binary - Binary\" \/>\n<meta property=\"og:description\" content=\"Binary RGB Colours Binary RGB Colours are created using a mix of three colours, each set at a different brightness &#8211; 0 for black, 255 for 100% brightness. This type of colour system is known as 24bit colour and is the system most widely used world wide! Example Colours using the 24 bit colour system&hellip;&nbsp;Read More &raquo;Color image representation in binary\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/\" \/>\n<meta property=\"og:site_name\" content=\"Binary\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-08T11:34:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb-300x300.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/\",\"url\":\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/\",\"name\":\"Color image representation in binary - Binary\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/binary\/#website\"},\"datePublished\":\"2017-01-02T17:45:03+00:00\",\"dateModified\":\"2022-11-08T11:34:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Binary Unit Home\",\"item\":\"https:\/\/learnlearn.uk\/binary\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Color image representation in binary\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/binary\/#website\",\"url\":\"https:\/\/learnlearn.uk\/binary\/\",\"name\":\"Binary\",\"description\":\"Just another My Blog site\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/binary\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/binary\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/binary\/#organization\",\"name\":\"Binary\",\"url\":\"https:\/\/learnlearn.uk\/binary\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learnlearn.uk\/binary\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2019\/02\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2019\/02\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"Binary\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/binary\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Color image representation in binary - Binary","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:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/","og_locale":"en_US","og_type":"article","og_title":"Color image representation in binary - Binary","og_description":"Binary RGB Colours Binary RGB Colours are created using a mix of three colours, each set at a different brightness &#8211; 0 for black, 255 for 100% brightness. This type of colour system is known as 24bit colour and is the system most widely used world wide! Example Colours using the 24 bit colour system&hellip;&nbsp;Read More &raquo;Color image representation in binary","og_url":"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/","og_site_name":"Binary","article_modified_time":"2022-11-08T11:34:18+00:00","og_image":[{"url":"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/rgb-300x300.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/","url":"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/","name":"Color image representation in binary - Binary","isPartOf":{"@id":"https:\/\/learnlearn.uk\/binary\/#website"},"datePublished":"2017-01-02T17:45:03+00:00","dateModified":"2022-11-08T11:34:18+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/binary\/color-image-representation-binary\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Binary Unit Home","item":"https:\/\/learnlearn.uk\/binary\/"},{"@type":"ListItem","position":2,"name":"Color image representation in binary"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/binary\/#website","url":"https:\/\/learnlearn.uk\/binary\/","name":"Binary","description":"Just another My Blog site","publisher":{"@id":"https:\/\/learnlearn.uk\/binary\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/binary\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/binary\/#organization","name":"Binary","url":"https:\/\/learnlearn.uk\/binary\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learnlearn.uk\/binary\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2019\/02\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2019\/02\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"Binary"},"image":{"@id":"https:\/\/learnlearn.uk\/binary\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/binary\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Binary RGB Colours Binary RGB Colours are created using a mix of three colours, each set at a different brightness &#8211; 0 for black, 255 for 100% brightness. This type of colour system is known as 24bit colour and is the system most widely used world wide! Example Colours using the 24 bit colour system&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/pages\/14"}],"collection":[{"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":6,"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":279,"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/pages\/14\/revisions\/279"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/binary\/wp-json\/wp\/v2\/media?parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}