Color Picker
HTML
<div class="wrapper">
<input class="cpicker" type="color" value="#00FF00" aria-label="Select a color">
</div>
CSS
.wrapper {
background: url(/assets/images/color-picker/color-pic.jpg) 0/cover;
height: 300px;
width: 960px;
max-width: 100%;
position: relative;
}
.cpicker {
/* removes default styling from input color element */
padding: 0;
border: none;
/* makes input (color swatch) 100% size of container */
position: absolute;
width: 100%;
height: 100%;
/* mix blend mode makes the color of the swatch alter the image behind it. */
mix-blend-mode: hue; /* try screen, multiply or other blend modes for different effects */
cursor: pointer;
}
/* removes default styling from input color element */
::-webkit-color-swatch {
border: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-moz-color-swatch,
::-moz-focus-inner {
border: none;
}
::-moz-focus-inner {
padding: 0;
}