Based on date paintings by On Kawara. sample: http://www.davidzwirner.com/exhibition/on-kawara-date-paintings-in-new-york-136-other-cities/
Last active
October 19, 2020 13:43
-
-
Save tankred/9699210 to your computer and use it in GitHub Desktop.
Today-painting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="OnKawara" width="501" height="345"></canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.getElementById("OnKawara"); | |
var context = canvas.getContext("2d"); | |
context.fillStyle = "white"; | |
context.font = "42pt 'Gill Sans MT',sans-serif"; | |
var monthNames = [ "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", | |
"JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" ]; | |
d = new Date(); | |
t = monthNames[d.getMonth()]; | |
t += d.getDate().toString(); | |
t += ','; | |
t += d.getFullYear().toString(); | |
var x = canvas.width / 2; | |
var y = canvas.height / 2; | |
context.textAlign = 'center'; | |
context.fillText(t, x,y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#OnKawara {background:#37383d;border:1px solid #69686d;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment