Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Colour Swatches Visualiser
<!doctype html>
<html>
<head>
<title>Colour Swatches</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #FAFBFC;
}
.container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding: 1vw;
}
.swatch {
width: 10vw;
height: 10vw;
min-width: 150px;
min-height: 150px;
margin: 1vw;
border-radius: 4px;
box-shadow: 0 4px 15px 5px rgba(0, 0, 0, 0.1);
transition: all 0.08s ease-in-out;
cursor: pointer;
}
.swatch:hover {
transform: scale(1.1);
box-shadow: 0 4px 15px 5px rgba(0, 0, 0, 0.2);
}
</style>
</head>
<body>
<div class="container">
<div class="swatch" style="background-color: #EE8D0A"></div>
<div class="swatch" style="background-color: #B4AE5A"></div>
<div class="swatch" style="background-color: #B4BCC4"></div>
<div class="swatch" style="background-color: white"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment