JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Design a Turtle Dove</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" </head>
<body>
<header></header>
<div id="wrapper">
<div id="turtle-dove">
<svg xmlns="http://www.w3.org/2000/svg" width="759" height="586" viewBox="0 0 759 586">
<path fill="#FFDE17" stroke="#000" stroke-width="4.08" stroke-miterlimit="10" d="M110.982 164.99L58 190.766c20.134 11.428 43.68 15.23 56.002 16.488-.012-.056-.028-.11-.04-.166-1.873-8.615-5.91-25.895-2.98-42.096z" />
<path class="wings" fill="#fff" stroke="#000" stroke-width="4.08" stroke-miterlimit="10" d="M272.084 199.57c11.264-5.715 22.835-9.69 33.333-11.96 20.52-4.44 81.58-16.46 146.37-22.587 37.588-3.554 76.6-6.94 110.066-9.632l1.802-.424 46.965-62.91s-211.156 56.32-265.04 65.612c-39.36 6.786-72.275 26.86-87.175 37.195 6.448 3.382 11.782 4.452 11.782 4.452l1.897.256z" />
<path class="main-body" fill="#fff" stroke="#000" stroke-width="4.08" stroke-miterlimit="10" d="M563.21 238.954l-4.204-.57c-45.59 40.368-95.176 80.494-113.938 91.508-35.754 20.986-180.736 83.93-219.183-.778-30.23-66.607 6.032-109.158 46.2-129.543l-1.897-.256s-5.333-1.07-11.782-4.452c-4.562-2.392-9.68-5.94-13.867-11.093-10.105-12.437-29.537-60.626-88.607-55.186-30.602 2.82-41.8 18.99-44.95 36.405-2.93 16.2 1.106 33.48 2.978 42.096.013.056.03.11.042.166 3.923 17.807 15.514 33.31 18.613 51.132 3.11 17.877-.776 111.146 101.042 157.004 90.17 40.61 204.415-22.54 244.055-47.412 15.762-9.89 22.302-14.247 24.467-15.91 4.885-1.533 14.322-4.247 24.498-5.854 14.77-2.332 69.952-10.88 69.952-10.88l108.037-88.606-141.458-7.772z" />
<path class="wings" fill="#fff" stroke="#000"...
CSS
/******************************
LAYOUT
*******************************/
#turtle-dove {
display: inline-block;
width: 55%;
margin-left: 5%;
float: left;
}
#turtle-dove svg {
width: 100%;
margin: auto;
}
#wrapper {
margin-top: 35px;
}
.color-picker {
display: inline-block;
width: 30%;
padding: 0 1.33% 1.33%;
margin: 2% 5% 2% 0;
background-color: #eee;
font-size: .9em;
float: right;
}
/******************************
COLOR SELECTION
*******************************/
.selected {
border: 3px solid #444;
}
ul {
display: inline-block;
margin: 0;
padding: 0;
}
li {
display: inline-block;
padding:15px;
margin: 2px;
background-color: #dcdcdc;
border: 1px solid #777;
color:#000;
text-decoration:none;
}
li:nth-child(1) {
background-color: lightgreen;
}
li:nth-child(2) {
background-color: blue;
}
li:nth-child(3) {
background-color: gray;
}
li:nth-child(4) {
background-color: brown;
}
li:nth-child(5) {
background-color: aqua;
}
li:nth-child(6) {
background-color: darkgrey;
}
li:nth-child(7) {
background-color: tan;
}
li:nth-child(8) {
background-color: firebrick;
}
li:nth-child(9) {
background-color: purple;
}
li:nth-child(10) {
background-color: lightblue;
}
.secondary-color {
fill: lightgreen;
}
.primary-color {
fill: purple;
}
.detail {
fill: orange;
}
.wings {
fill: blue;
}
.main-body {
fill: gray;
}
.inner-wing {
fill: firebrick;
}
JavaScript
var mainBodyColor = $(".main-body-select .selected").css("background-color");
//Change the selected color in the color picker list elements.
$(".main-body-select li").click(function () {
//Deselect sibling elements
$(this).siblings().removeClass("selected");
//Select clicked element
$(this).addClass("selected");
//store color here
mainBodyColor = $(this).css("background-color");
});
$(".main-body").css("fill", mainBodyColor);