cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

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.

              <img src="http://blattchat.com/wp-content/uploads/2013/05/thief_bw.png"/>
<img src="http://blattchat.com/wp-content/uploads/2013/05/thief_bw.png" class="recolor"/>
<form action="#">
  <label for="black">Map Black To: </label>
  <input type="color" id="black" value="#FF6600"/>
  <label for="white">Map White To: </label>
  <input type="color" id="white" value="#3300FF"/>
<i>Thief image courtesy of Igor Yanovskiy, from The Noun Project</i>

<svg width="0" height="0">
    <filter id="DuotoneFilter">
        <feFuncR id="funcR" type="table" tableValues="1 .2"/>
        <feFuncG id="funcG" type="table" tableValues="0.4 0"/>
        <feFuncB id="funcB" type="table" tableValues="0 1"/>        
              img.recolor {
  -webkit-filter: url(#DuotoneFilter); 
  filter: url(#DuotoneFilter);

              jQuery('#black').change(function() {

jQuery('#white').change(function() {

function remapBlack(color) {
  remapColor(color, 0);

function remapWhite(color) {
  remapColor(color, 1);

function remapColor(color, index) {
  var red = parseInt(color.substr(1, 2), 16);
  var funcR = document.getElementById('funcR');
  var tableValues = funcR.getAttribute('tableValues').split(' ');
  tableValues[index] = red / 255;
  funcR.setAttribute('tableValues', tableValues.join(' '));
  var green = parseInt(color.substr(3, 2), 16);
  var funcG = document.getElementById('funcG');
  var tableValues = funcG.getAttribute('tableValues').split(' ');
  tableValues[index] = green / 255;
  funcG.setAttribute('tableValues', tableValues.join(' '));
  var blue = parseInt(color.substr(5, 2), 16);
  var funcB = document.getElementById('funcB');
  var tableValues = funcB.getAttribute('tableValues').split(' ');
  tableValues[index] = blue / 255;
  funcB.setAttribute('tableValues', tableValues.join(' '));  

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