{"id":1323,"date":"2010-03-29T00:01:16","date_gmt":"2010-03-29T08:01:16","guid":{"rendered":"http:\/\/www.wambooli.com\/blog\/?p=1323"},"modified":"2010-03-27T13:16:03","modified_gmt":"2010-03-27T21:16:03","slug":"rgby-oh-my-part-i","status":"publish","type":"post","link":"https:\/\/www.wambooli.com\/blog\/?p=1323","title":{"rendered":"RGBY &#8211; Oh, My! Part I"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wambooli.com\/blog\/wp-content\/uploads\/2010\/03\/rgby.png\" alt=\"\" title=\"rgby\" width=\"271\" height=\"68\" class=\"alignnone size-full wp-image-1327\" \/><br \/>\nIt feels like a <em>Twilight Zone<\/em> opening: There is a fourth color, beyond that known to computers. That color, is yellow.<br \/>\n<!--more--><br \/>\nBefore going into RGBY, let me take on a familiarity tour of RGB.<\/p>\n<p>RGB stands for red, green, and blue, the three primary colors.<\/p>\n<p>Yes, in Kindergarden finger painting class, you probably were taught that red, blue, and yellow were the primary colors. Yes, they&#8217;re primary <em>subtractive<\/em> colors, which apply to pigments, paints, and dyes. When you&#8217;re mixing light to produce an image, you use <em>additive<\/em> colors: red, green, and blue.<\/p>\n<p>By combining the colors red, green, and blue you can get just about any other color your human eyeball can see, such as these six, basic colors shown in this simple color wheel:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wambooli.com\/blog\/wp-content\/uploads\/2010\/03\/rygcbm.png\" alt=\"\" title=\"rygcbm\" width=\"220\" height=\"244\" class=\"alignnone size-full wp-image-1328\" \/><\/p>\n<p>You can also add two colors to that wheel: black and white. Here&#8217;s how the colors are combined and created:<\/p>\n<table border=\"0\" width=\"400\">\n<tr>\n<th width=\"25%\">&nbsp;<\/th>\n<th width=\"25%\">Red<\/th>\n<th width=\"25%\">Green<\/th>\n<th width=\"25%\">Blue<\/th>\n<\/tr>\n<tr>\n<th align=\"right\">Red<\/th>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">0%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Yellow<\/th>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">0%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Green<\/th>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">0%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Cyan<\/th>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">100%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Blue<\/th>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">100%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Magenta<\/th>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">100%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Black<\/th>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">0%<\/td>\n<td align=\"right\">0%<\/td>\n<\/tr>\n<tr>\n<th align=\"right\">White<\/th>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">100%<\/td>\n<td align=\"right\">100%<\/td>\n<\/tr>\n<\/table>\n<p>Computers have long-used red, green, and blue to produce color images on a monitor. In fact, I remember the proper order because of the old RGB monitors, where the RGB stood for red, green, and blue.<\/p>\n<p>It&#8217;s important to get the order right because color programming and design often involves setting the values for red, green, and blue in that order.<\/p>\n<p>For example, when defining color for a web page, HTML uses RGB values. Rather than use percentage values, as I did in the table above, HTML uses 256 values: There are 256 values for red, 256 values for green, and 256 values for blue. Those combinations make for millions of possible colors on a web page.<\/p>\n<p>Of course, HTML uses hexadecimal values to keep things neat. So when setting the color yellow, for example, you use the value <code>#FFFF00<\/code>.<\/p>\n<p>While <code>#FFFF00<\/code> may look scary, remember RGB: That&#8217;s <code>FF<\/code> for red, or 100%, then <code>FF <\/code>for green (100%), and <code>00<\/code> or 0% for blue. The end result, from the table and the color wheel above, is yellow. <code>#FFFF00<\/code> is the HTML color code for yellow.<\/p>\n<p>Gander at this updated color table:<\/p>\n<table border=\"0\" width=\"200\">\n<tr>\n<th width=\"25%\">&nbsp;<\/th>\n<th width=\"25%\">HTML<\/th>\n<\/tr>\n<tr>\n<th align=\"right\">Red<\/th>\n<td align=\"right\"><code>#FF0000<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Yellow<\/th>\n<td align=\"right\"><code>#FFFF00<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Green<\/th>\n<td align=\"right\"><code>#00FF00<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Cyan<\/th>\n<td align=\"right\"><code>#00FFFF<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Blue<\/th>\n<td align=\"right\"><code>#0000FF<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Magenta<\/th>\n<td align=\"right\"><code>#FF00FF<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">Black<\/th>\n<td align=\"right\"><code>#000000<\/code><\/td>\n<\/tr>\n<tr>\n<th align=\"right\">White<\/th>\n<td align=\"right\"><code>#FFFFFF<\/code><\/td>\n<\/tr>\n<\/table>\n<p>That&#8217;s still the same ol&#8217; RGB. In fact, that&#8217;s how I read the code left-to-right: are jee bee.<\/p>\n<p>HTML uses other values besides <code>FF<\/code> and <code>00<\/code>. The &#8220;half&#8221; value of <code>FF<\/code> is <code>80<\/code> in hexadecimal. Then there are all sorts of other in between values. (Hexadecimal uses numbers <code>0<\/code> through <code>9<\/code> and letters <code>A<\/code> through <code>F<\/code> to represent values 0 through 15. Read more about hexadecimal <a href=\"http:\/\/www.wambooli.com\/blog\/?p=144\">here<\/a>).<\/p>\n<p>All told, there are over 16 million possible color combinations in HTML. You can see a bunch of them at <a href=\"http:\/\/www.w3schools.com\/html\/html_colors.asp\" target=\"_blank\">this web site<\/a>.<\/p>\n<p>Incidentally, DOS used a similar scheme with the same colors, though DOS kind of messed up the order:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wambooli.com\/blog\/wp-content\/uploads\/2010\/03\/dos-colors.png\" alt=\"\" title=\"dos-colors\" width=\"556\" height=\"69\" class=\"alignnone size-full wp-image-1326\" srcset=\"https:\/\/www.wambooli.com\/blog\/wp-content\/uploads\/2010\/03\/dos-colors.png 556w, https:\/\/www.wambooli.com\/blog\/wp-content\/uploads\/2010\/03\/dos-colors-300x37.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/p>\n<p>Once upon a time, I had that sequence in my head. Now all I think is RGB.<\/p>\n<p>Of course, that may now change because a fourth color, yellow, is being added to the mix. I&#8217;ll discuss the special new color additive on Wednesday&#8217;s blog post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It feels like a Twilight Zone opening: There is a fourth color, beyond that known to computers. That color, is yellow.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1323","post","type-post","status-publish","format-standard","hentry","category-main"],"_links":{"self":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1323"}],"version-history":[{"count":16,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1323\/revisions"}],"predecessor-version":[{"id":1344,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1323\/revisions\/1344"}],"wp:attachment":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}