cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <style type="text/css" contenteditable>
 .unit span {
   opacity: .3; 
 }</style> 

<header class="header c-11">
  <h1 class="title">
    <a href="http://codepen.io/atelierbram/pen/IrGzb">colour scheme blending tool</a></h1>
  <p class="tagline c-11">
  drag and drop circles; use a colourpicker to get blends 
  </p>                          
</header> 
   <section class="row">
        <pre contenteditable class="color-converter">background-color:<b>&nbsp;hsla</b>(
   <span class="hsl-value" id="hsl-h-value">200,</span>  <input id="hsl-h" type="range" min="0" max="360" value="200" onChange="changeHSL()">&nbsp;H&nbsp;&nbsp;
   <span class="hsl-value" id="hsl-s-value">49%,</span> <input id="hsl-s" type="range" min="0" max="100" value="49" onChange="changeHSL()">&nbsp;S&nbsp;&nbsp;
   <span class="hsl-value" id="hsl-l-value">66%, </span> <input id="hsl-l" type="range" min="0" max="100" value="66" onChange="changeHSL()">&nbsp;L&nbsp;&nbsp;
   <span class="hsl-value" id="hsl-a-value">1.00</span>	 <input id="hsl-a" type="range" min="0" max="100" value="100" onChange="changeHSL()">&nbsp;A&nbsp;&nbsp;
);        </pre><h1 id="hsl-example" class="example"> HSLA Colors</h1>
  </section>
 
<div class="row c-1"> 
  <style scoped type="text/css" contenteditable>
/* Edit the background-color here */ 

/* A: White */
.c-1 { 
  background-color: hsla(0, 100%, 100%, 1);
} 
</style>
 
 <span class="c-name">A</span>
 <div class="line">
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
     <span class="sp-1 c-2"></span><span class="sp-2 c-2"></span><span class="sp-3 c-2"></span><span class="sp-4 c-2"></span><span class="sp-5 c-2"></span><span class="sp-6 c-2"></span><span class="sp-7 c-2"></span><span class="sp-8 c-2"></span><span class="sp-9 c-2"></span><span class="sp-10 c-2">B</span> 
   </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-12"></span><span class="sp-2 c-12"></span><span class="sp-3 c-12"></span><span class="sp-4 c-12"></span><span class="sp-5 c-12"></span><span class="sp-6 c-12"></span><span class="sp-7 c-12"></span><span class="sp-8 c-12"></span><span class="sp-9 c-12"></span><span class="sp-10 c-12">L</span>
  </div><!-- /.unit -->
</div><!-- /.line --> 
</div><!-- /.row --> 

<div class="row c-2"> 
   <style scoped type="text/css" contenteditable>
/* B: Black */
.c-2 { 
  background-color: hsla(0, 0%, 0%, 1);
} 
</style>
 
<span class="c-name">B</span>
<div class="line">
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
     <span class="sp-1 c-1"></span><span class="sp-2 c-1"></span><span class="sp-3 c-1"></span><span class="sp-4 c-1"></span><span class="sp-5 c-1"></span><span class="sp-6 c-1"></span><span class="sp-7 c-1"></span><span class="sp-8 c-1"></span><span class="sp-9 c-1"></span><span class="sp-10 c-1 c-dark">A</span> 
 </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-11"></span><span class="sp-2 c-11"></span><span class="sp-3 c-11"></span><span class="sp-4 c-11"></span><span class="sp-5 c-11"></span><span class="sp-6 c-11"></span><span class="sp-7 c-11"></span><span class="sp-8 c-11"></span><span class="sp-9 c-11"></span><span class="sp-10 c-11 c-light">K</span>
  </div><!-- /.unit --> 
</div><!-- /.line --> 
</div><!-- /.row -->

<div class="row c-3"> 
    <style scoped type="text/css" contenteditable>
/* C: Lemon Zest */
.c-3 { 
  background-color: hsla(48, 100%, 68%, 1);
} 
</style>
 
<span class="c-name c-dark">C</span>
<div class="line">
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-4"></span><span class="sp-2 c-4"></span><span class="sp-3 c-4"></span><span class="sp-4 c-4"></span><span class="sp-5 c-4"></span><span class="sp-6 c-4"></span><span class="sp-7 c-4"></span><span class="sp-8 c-4"></span><span class="sp-9 c-4"></span><span class="sp-10 c-4 c-dark">D</span>
  </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-10"></span><span class="sp-2 c-10"></span><span class="sp-3 c-10"></span><span class="sp-4 c-10"></span><span class="sp-5 c-10"></span><span class="sp-6 c-10"></span><span class="sp-7 c-10"></span><span class="sp-8 c-10"></span><span class="sp-9 c-10"></span><span class="sp-10 c-10 c-dark">J</span>
  </div><!-- /.unit --> 
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-4"> 
    <style scoped type="text/css" contenteditable>
/* D: Tender Shoots */
.c-4 { 
  background-color: hsla(70, 64%, 57%, 1);
} 
</style>
 
<span class="c-name">D</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-3"></span><span class="sp-2 c-3"></span><span class="sp-3 c-3"></span><span class="sp-4 c-3"></span><span class="sp-5 c-3"></span><span class="sp-6 c-3"></span><span class="sp-7 c-3"></span><span class="sp-8 c-3"></span><span class="sp-9 c-3"></span><span class="sp-10 c-3 c-dark">C</span>
  </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-9"></span><span class="sp-2 c-9"></span><span class="sp-3 c-9"></span><span class="sp-9 c-9"></span><span class="sp-5 c-9"></span><span class="sp-6 c-9"></span><span class="sp-7 c-9"></span><span class="sp-8 c-9"></span><span class="sp-9 c-9"></span><span class="sp-10 c-9 c-dark">I</span>
  </div><!-- /.unit --> 
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-5"> 
    <style scoped type="text/css" contenteditable>
/* E: Grayed Jade */
.c-5 { 
  background-color: hsla(155, 34%, 70%, 1);
} 
</style>
 
<span class="c-name">E</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-6"></span><span class="sp-2 c-6"></span><span class="sp-3 c-6"></span><span class="sp-4 c-6"></span><span class="sp-5 c-6"></span><span class="sp-6 c-6"></span><span class="sp-7 c-6"></span><span class="sp-8 c-6"></span><span class="sp-9 c-6"></span><span class="sp-10 c-6 c-light">F</span>
  </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-8"></span><span class="sp-2 c-8"></span><span class="sp-3 c-8"></span><span class="sp-4 c-8"></span><span class="sp-5 c-8"></span><span class="sp-6 c-8"></span><span class="sp-7 c-8"></span><span class="sp-8 c-8"></span><span class="sp-9 c-8"></span><span class="sp-10 c-8 c-light">H</span>
  </div><!-- /.unit --> 
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-6"> 
    <style scoped type="text/css" contenteditable>
/* F: Emerald */
.c-6 { 
  background-color: hsla(171, 100%, 33%, 1);
} 
</style>
 
<span class="c-name c-light">F</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-5"></span><span class="sp-2 c-5"></span><span class="sp-3 c-5"></span><span class="sp-4 c-5"></span><span class="sp-5 c-5"></span><span class="sp-6 c-5"></span><span class="sp-7 c-5"></span><span class="sp-8 c-5"></span><span class="sp-9 c-5"></span><span class="sp-10 c-5 c-dark">E</span>
  </div><!-- /.unit --> 
 
  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-7"></span><span class="sp-2 c-7"></span><span class="sp-3 c-7"></span><span class="sp-4 c-7"></span><span class="sp-5 c-7"></span><span class="sp-6 c-7"></span><span class="sp-7 c-7"></span><span class="sp-8 c-7"></span><span class="sp-9 c-7"></span><span class="sp-10 c-7 c-dark">G</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-7"> 
    <style scoped type="text/css" contenteditable>
/* G: Dusk Blue */
.c-7 { 
  background-color: hsla(200, 49%, 66%, 1);
} 
</style>
 
<span class="c-name">G</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-8"></span><span class="sp-2 c-8"></span><span class="sp-3 c-8"></span><span class="sp-4 c-8"></span><span class="sp-5 c-8"></span><span class="sp-6 c-8"></span><span class="sp-7 c-8"></span><span class="sp-8 c-8"></span><span class="sp-9 c-8"></span><span class="sp-10 c-8 c-light">H</span>
  </div><!-- /.unit --> 
 
  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-6"></span><span class="sp-2 c-6"></span><span class="sp-3 c-6"></span><span class="sp-4 c-6"></span><span class="sp-5 c-6"></span><span class="sp-6 c-6"></span><span class="sp-7 c-6"></span><span class="sp-8 c-6"></span><span class="sp-9 c-6"></span><span class="sp-10 c-6 c-light">F</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-8"> 
    <style scoped type="text/css" contenteditable>
/* H: Monaco Blue */
.c-8 { 
  background-color: hsla(212, 70%, 28%, 1);
} 
</style>
 
<span class="c-name c-light">H</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-7"></span><span class="sp-2 c-7"></span><span class="sp-3 c-7"></span><span class="sp-4 c-7"></span><span class="sp-5 c-7"></span><span class="sp-6 c-7"></span><span class="sp-7 c-7"></span><span class="sp-8 c-7"></span><span class="sp-9 c-7"></span><span class="sp-10 c-7 c-dark">G</span>
  </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-5"></span><span class="sp-2 c-5"></span><span class="sp-3 c-5"></span><span class="sp-4 c-5"></span><span class="sp-5 c-5"></span><span class="sp-6 c-5"></span><span class="sp-7 c-5"></span><span class="sp-8 c-5"></span><span class="sp-9 c-5"></span><span class="sp-10 c-5 c-dark">E</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-9"> 
    <style scoped type="text/css" contenteditable>
/* I: African Violet */
.c-9 { 
  background-color: hsla(285, 29%, 68%, 1);
} 
</style>
 
<span class="c-name">I</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div> 
    <span class="sp-1 c-10"></span><span class="sp-2 c-10"></span><span class="sp-3 c-10"></span><span class="sp-4 c-10"></span><span class="sp-5 c-10"></span><span class="sp-6 c-10"></span><span class="sp-7 c-10"></span><span class="sp-8 c-10"></span><span class="sp-9 c-10"></span><span class="sp-10 c-10 c-dark">J</span>
  </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-4"></span><span class="sp-2 c-4"></span><span class="sp-3 c-4"></span><span class="sp-4 c-4"></span><span class="sp-5 c-4"></span><span class="sp-6 c-4"></span><span class="sp-7 c-4"></span><span class="sp-8 c-4"></span><span class="sp-9 c-4"></span><span class="sp-10 c-4 c-dark">D</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-10"> 
    <style scoped type="text/css" contenteditable>
/* J: Linen */
.c-10 { 
  background-color: hsla(28, 77%, 88%, 1);
} 
</style>
 
<span class="c-name c-dark">J</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-9"></span><span class="sp-2 c-9"></span><span class="sp-3 c-9"></span><span class="sp-4 c-9"></span><span class="sp-5 c-9"></span><span class="sp-6 c-9"></span><span class="sp-7 c-9"></span><span class="sp-8 c-9"></span><span class="sp-9 c-9"></span><span class="sp-10 c-9 c-dark">I</span>
  </div><!-- /.unit -->

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-3"></span><span class="sp-2 c-3"></span><span class="sp-3 c-3"></span><span class="sp-4 c-3"></span><span class="sp-5 c-3"></span><span class="sp-6 c-3"></span><span class="sp-7 c-3"></span><span class="sp-8 c-3"></span><span class="sp-9 c-3"></span><span class="sp-10 c-3 c-dark">C</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-11"> 
    <style scoped type="text/css" contenteditable>
/* K: Poppy Red */
.c-11 { 
  background-color: hsla(2, 70%, 51%, 1);
} 
</style>
 
<span class="c-name c-light">K</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-12"></span><span class="sp-2 c-12"></span><span class="sp-3 c-12"></span><span class="sp-4 c-12"></span><span class="sp-5 c-12"></span><span class="sp-6 c-12"></span><span class="sp-7 c-12"></span><span class="sp-8 c-12"></span><span class="sp-9 c-12"></span><span class="sp-10 c-12 c-dark">L</span>
  </div><!-- /.unit --> 
 
  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-2"></span><span class="sp-2 c-2"></span><span class="sp-3 c-2"></span><span class="sp-4 c-2"></span><span class="sp-5 c-2"></span><span class="sp-6 c-2"></span><span class="sp-7 c-2"></span><span class="sp-8 c-2"></span><span class="sp-9 c-2"></span><span class="sp-10 c-2 c-light">B</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->
 
<div class="row c-12"> 
    <style scoped type="text/css" contenteditable>
/* L: Nectarine */
.c-12 { 
  background-color: hsla(22, 90%, 64%, 1);
} 
</style>
 
<span class="c-name">L</span>
<div class="line"> 
  <div class="unit unit-l"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-11"></span><span class="sp-2 c-11"></span><span class="sp-3 c-11"></span><span class="sp-4 c-11"></span><span class="sp-5 c-11"></span><span class="sp-6 c-11"></span><span class="sp-7 c-11"></span><span class="sp-8 c-11"></span><span class="sp-9 c-11"></span><span class="sp-10 c-11 c-light">K</span>
  </div><!-- /.unit --> 

  <div class="unit unit-r"> 
    <div class="count" data-col-moves="0"></div>
    <span class="sp-1 c-1"></span><span class="sp-2 c-1"></span><span class="sp-3 c-1"></span><span class="sp-4 c-1"></span><span class="sp-5 c-1"></span><span class="sp-6 c-1"></span><span class="sp-7 c-1"></span><span class="sp-8 c-1"></span><span class="sp-9 c-1"></span><span class="sp-10 c-1 c-dark">A</span>
  </div><!-- /.unit -->
 </div><!-- /.line --> 
</div><!-- /.row -->

<div class="subfooter"> 
  <div class="line"> 
  <h3>credits:</h3>
  <ul>
    <li><a href="http://www.standardista.com/hsla-color-picker/">HSLA Color Picker / RGBA Converter by Estelle Weyl</a></li>
    <li><a href="https://github.com/estelle/HSLA-Color-Converter">HSLA Color Picker on Github</a></li> 
  </ul>
  </div>

  <div class="line"> 
  <h3>other webcolour tools:</h3>
 <ul>
   <li><a href="http://mothereffinghsl.com/">Mother-effing Hsl by Paul Irish</a></li> 
 <li><a href="http://hslpicker.com/">HSL Color Picker by Brandon Mathis</a></li> 
  <li><a href="http://css-tricks.com/examples/HSLaExplorer/">HSLa explorer on css-tricks.com</a></li>
  </ul>
  <ul>
  <li><a href="http://meyerweb.com/eric/tools/color-blend/">Web Color Blender by Eric Meyer</a></li>
   <li><a href="http://meyerweb.com/eric/css/colors/">color keywords table by Eric Meyer</a></li> 
    <li><a href="http://atelierbram.github.io/c-tiles16/colorscheming">c-Tiles16 by Bram de Haan</a></li>
  </ul>
  </div>
</div>

<footer class="footer c-11"><a href="https://github.com/atelierbram/Colour-Scheme-Blending">Fork this on Github</a></footer>

<div class="bt">
  <span class="b--sp c-3"></span>
  <span class="b--sp c-4"></span>
  <span class="b--sp c-5"></span>
  <span class="b--sp c-6"></span>
  <span class="b--sp c-7"></span>
  <span class="b--sp c-8"></span> 
  <span class="b--sp c-9"></span>
  <span class="b--sp c-10"></span>
  <span class="b--sp c-11"></span> 
  <span class="b--sp c-12"></span> 
</div>
<div class="bb">
  <span class="b--sp c-3"></span>
  <span class="b--sp c-4"></span>
  <span class="b--sp c-5"></span>
  <span class="b--sp c-6"></span>
  <span class="b--sp c-7"></span>
  <span class="b--sp c-8"></span> 
  <span class="b--sp c-9"></span>
  <span class="b--sp c-10"></span>
  <span class="b--sp c-11"></span> 
  <span class="b--sp c-12"></span> 
</div> 
            
          
!
            
              * { 
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline; 
}

/* http://www.html5rocks.com/en/tutorials/dnd/basics/ */ 
/* Prevent the text contents of draggable elements from being selectable. */
[draggable] {
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  /* Required to make elements draggable in old WebKit */
  -khtml-user-drag: element;
  -webkit-user-drag: element;
}
.unit {
  position: relative;
  height: 100px;
  width: 100px;
  margin: 1em; 
  -webkit-border-radius: 50%;
  -ms-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  text-align: center;
  cursor: move;
} 
.unit-l,
.b--sp, 
.subfooter li {
  float: left;
}
.unit-r {
  float: right;
} 
.unit span {
  position: absolute;
  display: block;
  -webkit-border-radius: 50%;
  -ms-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%; 
  font-size: .8em;
  opacity: .15; 
} 
.unit .sp-10 { 
  opacity: 1; 
  line-height: 1.25;
}
.line .c-dark,
.unit .c-dark { 
  color: black;
} 
.line .c-light,
.unit .c-light,
.c-2 { 
  color: white;
} 
.c-1 { 
  background-color: white;
} 
.c-2 { 
  background-color: black;
} 
/* C: Lemon Zest */ 
.c-3 { 
  background-color: #FFDF5E;
  background-color: hsl(48, 100%, 68%);
}
/* D: Tender Shoots */
.c-4 { 
  background-color: #BFD74B;
  background-color: hsl(70, 64%, 57%);
}
/* E: Grayed Jade*/
.c-5 { 
  background-color: #98CCB6;
  background-color: hsl(155, 34%, 70%);
}
/* F: Emerald */
.c-6 { 
  background-color: #00A78D;
  background-color: hsl(171, 100%, 33%);
}
/* G: Dusk Blue*/
.c-7 { 
  background-color: #7DB6D3;
  background-color: hsl(200, 49%, 66%);
}
/* H: Monaco Blue */
.c-8 { 
  background-color: #154478;
  background-color: hsl(212, 70%, 28%);
}
/* I: African Violet */
.c-9 { 
  background-color: #B995C5;
  background-color: hsl(285, 29%, 68%);
} 
/* J: Linen  */
.c-10 { 
  background-color: #F8DFC9;
  background-color: hsl(28, 77%, 88%);
} 
/* K: Poppy Red */
.c-11 { 
  background-color: #D9302B;
  background-color: hsl(2, 70%, 51%);
}
/* L: Nectarine */
.c-12 { 
  background-color: #F68E51;
  background-color: hsl(22, 90%, 64%);
} 
body {
  font: 100%/1.375 AvenirNextCondensed-Regular, Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Segoe Ui", "DejaVu Sans", Verdana, sans-serif; 
  background-color: #fff;
  color: #000; 
  position: relative;
} 
.header, .footer {
  text-align: center;
  display: block; 
  border-top: 1px solid #BA1920;
  border-bottom: 1px solid #811116;
}
a, a:link {  
  text-decoration: none;
  color: #811116;
} 
.header a, 
.footer a {  
  display: block;
  color: #FFF7F2;
  text-shadow: 1px 1px 3px hsla(0,0%,0%,.5);
  padding-top: .5em;
}
.footer a {
  padding-bottom: .5em;
} 
.header {  
  font-family: AvenirNextCondensed-DemiBold, Corbel, "Lucida Grande", "Lucida Sans", "Segoe Ui", "Trebuchet MS", sans-serif; 
  height: 56px;
  margin-bottom: .75em;
}
.footer {
  height: 40px;
  /* padding-bottom: 12px; */
}
.title {  
  color: #FFF7F2;
  text-transform: capitalize; 
  font-size: 1.5em;
  margin-top: -.5em;
} 
.tagline {  
  font-size: .75em;
  color: #3D0C0A;
  padding-bottom: .5em;
  border-bottom: 1px solid #BA1920;
} 
.title,  
.tagline {  
  white-space: nowrap;
text-overflow: ellipsis;
} 
.line {
  margin: 0 auto 2em;
} 
.row {
  position: relative;
}
.row,
.line { 
  overflow: auto;
}
.c-name {
  display: block;
  text-align: center;
  margin-top: 1em;
} 
.sp-1 {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0; 
}
.sp-2 {
  width: 90%;
  height: 90%;
  top: 5%;
  left: 5%; 
}
.sp-3 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%; 
}
.sp-4 {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%; 
}
.sp-5 {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%; 
}
.sp-6 {
  width: 50%;
  height: 50%;
  top: 25%;
  left: 25%; 
}
.sp-7 {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%; 
}
.sp-8 {
  width: 30%;
  height: 30%;
  top: 35%;
  left: 35%; 
}
.sp-9 {
  width: 20%;
  height: 20%;
  top: 40%;
  left: 40%; 
}
.sp-10 {
  width: 10%;
  height: 10%;
  top: 45%;
  left: 45%; 
}
.count {
  height: 100%;
} 
.bt,
.bb {
  position: absolute;
  left: 0;
  width: 100%;
  height: 12px;
  z-index: 1;
} 
.bt {
  top: 58px;
}
.bb {
  bottom: 42px;
  border-top: 1px solid #BA1920;
} 
.b--sp {
  width: 10%;
  height: 12px;
}
.subfooter {
  margin: 1em auto;
  /* width: 40%; */
  padding: 1em; 
}
.subfooter ul {
  list-style-type: none; 
  color: #087282;
}
.subfooter li {
  width: 30%;
  margin-left: 3.33%
} 
.subfooter a {
  display: block;
  padding: .25em; 
} 
.subfooter a:focus,
.subfooter a:hover { 
  background-color: #00A78D;
  color: #fff; 
}
h3 { 
  color: #087282;
  text-transform: capitalize;
}
head {display: block;}

/* color-converter */
/* http://www.standardista.com/hsla-color-picker/ */
/* https://github.com/estelle/HSLA-Color-Converter */
style[contenteditable],
.color-converter,
.example {
  font: .75em/1.33 Consolas, "DejaVu Sans Mono", Monaco, monospace;
} 

style[contenteditable],
.color-converter {
  white-space: pre;
  padding: 0.5em;
  background: white;
  background: hsla(360, 100%, 100%, 0.5);
  color: black;
  position: absolute;
  width: 310px;
  right: 0;
  top: 0; 
  display: block;
   -webkit-box-shadow: 1px 3px 12px hsla(0,0%,0%,.5);
  box-shadow: 1px 3px 12px hsla(0,0%,0%,.5); 
  z-index: 2;
}
.example {
  background-color:  hsla(328, 100%, 44%, 1);
  padding: 15px;
  color: #FFF;
  text-shadow: 2px 2px 2px rgba(0,0,0,0.4);
  font-size: 1.75em;
  text-align: center;
}
input[type="range"]  {
  width: 210px;
  display: inline-block;
}

@media only screen and (min-width: 454px) {
  .unit {
    height: 150px;
    width: 150px;
  } 
  .unit .sp-10 { 
    line-height: 1.5;
  } 
} 
@media only screen and (min-width: 600px) {
  .line {
    width: 37.5em;
  }
  .unit {
    height: 200px;
    width: 200px;
  } 
  .unit .sp-10 { 
    line-height: 1.75;
  } 
 .header {  
  height: 83px;
} 
 .title {  
  font-size: 2.25em;
} 
 .tagline {  
  font-size: 1.125em; 
}
 .bt {
  top: 85px;
} 
}  
@media only screen and (min-width: 800px) {
  .line {
    width: 50em;
  }
  .unit {
    height: 300px;
    width: 300px;
  } 
  .unit .sp-10 { 
    line-height: 2.5;
  } 
} 

/* Fashion Color Report Collection - Women’s Spring 2013
 * http://www.pantone.com/pages/products/product.aspx?pid=1333&ca=4 
 * http://www.pantone.com/pages/pantone/color_xref.aspx
 * http://www.thecolorswatch.com/
 * http://marivecchio.blogspot.nl/2013/01/fata-e-strega-insiemein-primavera-si-puo.html
 */
            
          
!
            
              // HTML5 drag and drop by Eric Bidelman 
// http://www.html5rocks.com/en/tutorials/dnd/basics/   
Element.prototype.hasClassName=function(name){return new RegExp("(?:^|\\s+)"+name+"(?:\\s+|$)").test(this.className);};Element.prototype.addClassName=function(name){if(!this.hasClassName(name)){this.className=this.className?[this.className,name].join(' '):name;}};Element.prototype.removeClassName=function(name){if(this.hasClassName(name)){var c=this.className;this.className=c.replace(new RegExp("(?:^|\\s+)"+name+"(?:\\s+|$)","g"),"");}};var samples=samples||{};(function(){var clx_='line';var cols_=document.querySelectorAll('.'+clx_+' .unit');var dragSrcEl_=null;this.handleDragStart=function(e){e.dataTransfer.effectAllowed='move';e.dataTransfer.setData('text/html',this.innerHTML);dragSrcEl_=this;this.addClassName('moving');};this.handleDragOver=function(e){if(e.preventDefault){e.preventDefault();}
      e.dataTransfer.dropEffect='move';return false;};this.handleDragEnter=function(e){this.addClassName('over');};this.handleDragLeave=function(e){this.removeClassName('over');};this.handleDrop=function(e){if(e.stopPropagation){e.stopPropagation();}
      if(dragSrcEl_!=this){dragSrcEl_.innerHTML=this.innerHTML;this.innerHTML=e.dataTransfer.getData('text/html');var count=this.querySelector('.count');var newCount=parseInt(count.getAttribute('data-col-moves'))+1;count.setAttribute('data-col-moves',newCount);count.textContent='moves: '+newCount;}
      return false;};this.handleDragEnd=function(e){[].forEach.call(cols_,function(col){col.removeClassName('over');col.removeClassName('moving');});};[].forEach.call(cols_,function(col){col.setAttribute('draggable','true');col.addEventListener('dragstart',this.handleDragStart,false);col.addEventListener('dragenter',this.handleDragEnter,false);col.addEventListener('dragover',this.handleDragOver,false);col.addEventListener('dragleave',this.handleDragLeave,false);col.addEventListener('drop',this.handleDrop,false);col.addEventListener('dragend',this.handleDragEnd,false);});})();

// HSLA Color Converter by Estelle Weyl
// http://www.standardista.com/hsla-color-picker/
// https://github.com/estelle/HSLA-Color-Converter 
var browserPrefix = getPrefix();		
function getPrefix() {
var myJS = document.getElementsByTagName('script')[0];
if('WebkitOpacity' in myJS.style) return 'webkit';
var regex = /^(Moz|Ms|O)(?=[A-Z])/;
for(var property in myJS.style) {
if(regex.test(property)) {
return property.match(regex)[0];
}
} 
return '';
}	

function createHSLA(h, s, l, a){
        var h = h || document.getElementById('hsl-h').value * 1.0;
        var s = s || document.getElementById('hsl-s').value * 1.0;
        var l = l || document.getElementById('hsl-l').value * 1.0;
        var a = a ||document.getElementById('hsl-a').value * 1.0;

var hslapicker = "";
for(var i=0; i <=360; i++){
  hslapicker+= '<i style="background: hsla(' + i + ', ' + s + '%, ' + l + '%, ' + a +')"></i>';
  }

}
function changeHSL() {
  var h = document.getElementById('hsl-h').value * 1.0;
  var s = document.getElementById('hsl-s').value * 1.0;
  var l = document.getElementById('hsl-l').value * 1.0;
  var a = document.getElementById('hsl-a').value * 1.0;
var hex = '';

a = ((a < 1 && a > 0) ? a : a / 100).toFixed(2);
        var el = document.getElementById('hsl-example');
if(a == 1){
var hsla = 'hsl(' + h + ', ' + s + '%, ' + l + '%)'
} else {
var hsla = 'hsla(' + h + ', ' + s + '%, ' + l + '%, ' + a + ')'	
}
        el.style.backgroundColor = hsla;
var rgba = el.style.backgroundColor;
if(a == 1){ 
   hex = '<br/>' + colorToHex(rgba);
}
el.innerHTML = hsla + " <br/>" + rgba + hex;

        document.getElementById('hsl-h-value').textContent = (h < 100)? h + ', ': h + ',';
        document.getElementById('hsl-s-value').textContent = (s < 100)? s + '%, ': s + '%,';
        document.getElementById('hsl-l-value').textContent = (l < 100)? l + '%, ': l + '%,';
        document.getElementById('hsl-a-value').textContent = a + '';
createHSLA(h, s, l, a);
      }

function colorToHex(color) {
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);

var red = parseInt(digits[2]);
var green = parseInt(digits[3]);
var blue = parseInt(digits[4]);

var rgb = blue | (green << 8) | (red << 16);
return digits[1] + '#' + rgb.toString(16); 

// https://raw.github.com/rohn/HSLA-Color-Converter/2958291dd89417040e15d039662d9b83ca8d4228/hsla.html

var hex = rgb.toString(16);
while (hex.length < 6) {
    hex = "0" + hex;
}

return digits[1] + '#' + hex;
};

      changeHSL();
createHSLA();

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console