Skip to content

Instantly share code, notes, and snippets.

@tankred
Last active October 19, 2020 13:42
Show Gist options
  • Save tankred/9879368 to your computer and use it in GitHub Desktop.
Save tankred/9879368 to your computer and use it in GitHub Desktop.
Hommage to the Square

Hommage to the Square

Homage to the Square: Soft Spoken, 1969 �Josef Albers (American, born Germany, 1888–1976) �Oil on Masonite; 48 x 48 in.

A Pen by Tankred on CodePen.

License.

<canvas id="JosefAlbers" width="540" height="557"></canvas>
<!--
HTML5 painting based on:
Artist: Josef Albers (American, born Germany, 1888–1976)
Homage to the Square: Soft Spoken, 1969
Oil on Masonite; 48 x 48 in. (121.9 x 121.9 cm)
-->
var canvas = document.getElementById('JosefAlbers');
var context = canvas.getContext('2d');
context.beginPath();
context.rect(52, 94, 436, 432);
context.fillStyle = '#4DA243';
context.fill();
context.lineWidth = 1;
context.strokeStyle = '#4CA53E';
context.stroke();
context.beginPath();
context.rect(107, 175, 326, 321);
context.fillStyle = '#397454';
context.fill();
context.lineWidth = 1;
context.strokeStyle = '#3C7254';
context.stroke();
context.beginPath();
/*
h
94 451
175 343
256 262
w 540
52 379
107 326
162 216
*/
context.rect(162, 256, 216, 207);
context.fillStyle = '#405A63';
context.fill();
context.lineWidth = 1;
context.strokeStyle = '#3C5760';
context.stroke();
#JosefAlbers{background:#007C8E;border:1px solid #A3BFC3;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment