This project sorts HTML elements (divs) by their hue.
Libraries used: d3.js, underscore.js, and jQuery
Based on this Stack Overflow discussion.
xxxxxxxxxx
<html>
<head>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
How big do you want your grid?
<span class="grid-size-option link" data-grid-size="3">3x3</span>
<span class="grid-size-option link" data-grid-size="4">4x4</span>
<span class="grid-size-option link" data-grid-size="5">5x5</span>
<span class="grid-size-option link" data-grid-size="6">6x6</span>
<span class="grid-size-option link" data-grid-size="7">7x7</span>
<span class="grid-size-option link" data-grid-size="8">8x8</span>
<span class="grid-size-option link" data-grid-size="9">9x9</span>
<span class="grid-size-option link" data-grid-size="10">10x10</span>
<span class="link sort">SORT!</span>
<div class="grid"></div>
<!-- js -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="scripts.js"></script>
</body>
</html>
https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
https://d3js.org/d3.v4.min.js
https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js