{"id":121,"date":"2011-10-30T21:17:57","date_gmt":"2011-10-31T04:17:57","guid":{"rendered":"http:\/\/new.joyofprocessing.com\/blog\/?p=121"},"modified":"2011-11-08T16:48:01","modified_gmt":"2011-11-09T00:48:01","slug":"how-to-draw-the-italian-flag","status":"publish","type":"post","link":"https:\/\/joyofprocessing.com\/blog\/2011\/10\/how-to-draw-the-italian-flag\/","title":{"rendered":"How to Draw the Italian Flag"},"content":{"rendered":"<p>This is one a series of posts on how to draw world flags. Finding the specifications for these flags, and attempting to reproduce the flag perfectly, according to the specifications, is a great way to teach yourself basic graphics programming. <\/p>\n<p>Like many flags, you&#8217;ll find a reasonably detailed <a href=\"http:\/\/en.wikipedia.org\/wiki\/Flag_of_Italy\">description of the layout of the Italian Flag<\/a> in Wikipedia. Here&#8217;s the sketch I came up with after reading that article:<\/p>\n<div class=\"\" style=\"width:450px;\">\n<div class=\"figborder\" style=\"width:450px;\"><script type=\"application\/processing\">\/\/ Italian Flag\n\n\/\/ Reference: http:\/\/en.wikipedia.org\/wiki\/Flag_of_Italy#Protocol\n\nint kHeight = 300; \/\/ The only number that needs changing\nsize(kHeight*3\/2, kHeight);\n\ncolor greenColor = color(0,146,70);     \/\/ Fern Green\ncolor whiteColor = color(241,242,241);  \/\/ Bright White\ncolor scarletColor = color(206,43,55);  \/\/ Flame Scarlet\n\nsmooth();\nnoStroke();\n\nfloat stripeWidth = width\/3.0;\n\nfill(greenColor);\nrect(0,0, stripeWidth, height);\n\nfill(whiteColor);\nrect(stripeWidth,0, stripeWidth, height);\n\nfill(scarletColor);\nrect(stripeWidth*2,0, stripeWidth, height);\n\n\n<\/script><\/div>\n<div class=\"ps_cap\"><a href=\"\/showexample.php?ex=flags\/Flag_of_Italy\">source<\/a><\/div>\n<\/div>\n<p>Like the <a href=\"\/blog\/2011\/10\/french-flag\/\">French flag<\/a>, this flag has a 3:2 aspect ratio and three equal stripes.  The only difference is the color.<\/p>\n<p>For the Italian flag, the article specifies a list of Pantone colors, and provides RGB equivalents, which I&#8217;ve rendered in Processing as:<\/p>\n<pre>\r\ncolor greenColor = color(0,146,70);    \/\/ Fern Green\r\ncolor whiteColor = color(241,242,241); \/\/ Bright White\r\ncolor scarletColor = color(206,43,55); \/\/ Flame Scarlet\r\n<\/pre>\n<p>Interestingly, the RGB version white color as provided in the Wikipedia article has a slight greenish skew, which is not reflected in either the CMYK or HSV equivalents.  The difference is slight enough that you won&#8217;t likely notice it (especially since it is sitting next to a large green area).<\/p>\n<p>Prev: <a href=\"\/blog\/2011\/10\/french-flag\/\">France<\/a><br \/>\nNext: <a href=\"\/blog\/2011\/11\/how-to-draw-the-union-jack\/\">The Union Jack<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is one a series of posts on how to draw world flags. Finding the specifications for these flags, and attempting to reproduce the flag perfectly, according to the specifications, is a great way to teach yourself basic graphics programming. Like many flags, you&#8217;ll find a reasonably detailed description of the layout of the Italian [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,5,6],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-beginner","tag-easy","tag-flag"],"_links":{"self":[{"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/comments?post=121"}],"version-history":[{"count":9,"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/posts\/121\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/media?parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/categories?post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joyofprocessing.com\/blog\/wp-json\/wp\/v2\/tags?post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}