{"id":4477,"date":"2017-01-01T18:03:01","date_gmt":"2017-01-01T23:03:01","guid":{"rendered":"http:\/\/nickm.com\/post\/?p=4477"},"modified":"2017-01-27T17:48:32","modified_gmt":"2017-01-27T22:48:32","slug":"happy-new-year-2017","status":"publish","type":"post","link":"https:\/\/nickm.com\/post\/2017\/01\/happy-new-year-2017\/","title":{"rendered":"Happy New Year 2017"},"content":{"rendered":"<p>My New Year&#8217;s poem  for 2017 is Colors, a 1KB Web page, online at <a href=\"http:\/\/nickm.com\/poems\/colors.html\">http:\/\/nickm.com\/poems\/colors.html<\/a> and here it is, too:<\/p>\n<p><pre style=\"font-size:80%\">&lt;!DOCTYPE html&gt;\r\n&lt;html style=\"overflow:hidden\"&gt;\r\n&lt;head&gt;&lt;meta charset=utf-8&gt;\r\n&lt;!-- Copyright (c) 2016 Nick Montfort &lt;nickm@nickm.com&gt;   2016-12-31, 1KB<\/pre>\n<\/p>\n<p><pre style=\"font-size:80%\">Copying and distribution of this file, with or without modification,\r\nare permitted in any medium without royalty provided the copyright\r\nnotice and this notice are preserved. This file is offered as-is,\r\nwithout any warranty.<\/pre>\n<\/p>\n<p><pre style=\"font-size:80%\">Click pauses, Add ?00f000 or similar to URL for the specified color.--&gt;\r\n&lt;script type=text\/javascript&gt;\r\nvar c = 0, i;\r\nfunction up() {\r\n if (c &gt; 16581375) { c = 0; }\r\n document.body.style.background = \"#\"+(\"00000\"+c.toString(16)).slice(-6);\r\n c += 1;\r\n}\r\nfunction pause(e) {\r\n if (i) { clearInterval(i); i = 0; } else { go(); }\r\n}\r\nfunction init() {\r\n var s = window.location.search;\r\n if (s.slice(0, 1) === '?') { c = parseInt(unescape(s.slice(1)), 16); }\r\n go();\r\n}\r\nfunction go() { i = window.setInterval(up, 5); };\r\n&lt;\/script&gt;\r\n&lt;title&gt;Colors&lt;\/title&gt;&lt;\/head&gt;\r\n&lt;body onload=init() onmousedown=pause(event)&gt;\r\n&lt;div style=\"width:100vw; height:100vh\"&gt;&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<\/p>\n<p>As the code says, you can add an argument in the URL to start with a particular color, such as medium gray:<\/p>\n<p><a href=\"http:\/\/nickm.com\/poems\/colors.html?808080\">http:\/\/nickm.com\/poems\/colors.html?808080<\/a><\/p>\n<p>Click to stop on a particular color that you especially like. Click again to continue moving through the colors. If you let it run, you\u2019ll see all 16581375 colors in just over 23 hours.<\/p>\n<p>Happy new year.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My New Year&#8217;s poem for 2017 is Colors, a 1KB Web page, online at http:\/\/nickm.com\/poems\/colors.html and here it is, too: &lt;!DOCTYPE html&gt; &lt;html style=&#8221;overflow:hidden&#8221;&gt; &lt;head&gt;&lt;meta charset=utf-8&gt; &lt;!&#8211; Copyright (c) 2016 Nick Montfort &lt;nickm@nickm.com&gt; 2016-12-31, 1KB Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/nickm.com\/post\/2017\/01\/happy-new-year-2017\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Happy New Year 2017&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[60,59,4],"class_list":["post-4477","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-computational","tag-computational-art","tag-poetry"],"_links":{"self":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/4477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/comments?post=4477"}],"version-history":[{"count":8,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/4477\/revisions"}],"predecessor-version":[{"id":4486,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/4477\/revisions\/4486"}],"wp:attachment":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/media?parent=4477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/categories?post=4477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/tags?post=4477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}