Created
August 5, 2017 13:01
-
-
Save GrahamWalters/1d6fa4203e156eb75da8809f259509cc to your computer and use it in GitHub Desktop.
Trianglify Background Generator
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Trianglify Background Generator</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/trianglify/0.4.0/trianglify.min.js"></script> | |
<script> | |
var pattern = Trianglify({ | |
width: 2560, | |
height: 1600, | |
cell_size: 100, | |
variance: 0.87, | |
// x_colors: ['#f7fcfd', '#e5f5f9', '#ccece6', '#99d8c9', '#66c2a4', | |
// '#41ae76', '#238b45', '#006d2c', '#00441b'] | |
x_colors: ['#1A2980', '#26D0CE','#360033','#0b8793'] | |
}); | |
// var svg = pattern.svg(); | |
// svg.style.width = '100%'; | |
// svg.style.height = '100%'; | |
// document.body.appendChild(svg); | |
document.body.appendChild(pattern.canvas()); | |
// document.location = pattern.png(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment