JSFiddle - React, Tailwind, and code Playground
by Corey Frang
HTML
<script src="http://code.jquery.com/color/jquery.color.js"></script>
<div class="test">
Click me to desaturate!
</div>
CSS
.test {
background: #bada55;
width: 300px;
height: 200px;
margin: 0px auto;
}
JavaScript
$(".test").click(function() {
$(this).animate({
backgroundColor: $.Color({
saturation: 0
})
}, 1000);
});