Metapost Sandbox
Debug
save
Save
play_arrow
Run
download
Export
share
Share
Link to share
Embed
person
Login using Github
My work
New...
Log out
Documentation
About
vardef hexrgb(expr Spec) = save r, g, b; numeric r, g, b; r = hex substring (1,3) of Spec; g = hex substring (3,5) of Spec; b = hex substring (5,7) of Spec; 1/256(r,g,b) enddef; beginfig(0); width:=100; rotation:=45; pen calligraphicpen ; calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ; z0 = (x1+150, 0); z1 = (0, y0+250); z2 = (x1+250, y1+250); z3 = (x2+250, y1); z4 = (x2, y0); pickup calligraphicpen; draw z0..z1..z2..z3..z4 withcolor hexrgb("#0ca678"); endfig; end