Skip to content

Instantly share code, notes, and snippets.

@lukem512
Created December 18, 2019 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukem512/a0ef8c0e7e3e62559814c9ddf6336e9c to your computer and use it in GitHub Desktop.
Save lukem512/a0ef8c0e7e3e62559814c9ddf6336e9c to your computer and use it in GitHub Desktop.
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