function drawneutral(color, count) {
      // Calculate neutrals
      var neuts = RXB.neutrals(color, val / 255, count);

      // clear the div
      while (neutralswatch.firstChild)
        neutralswatch.removeChild(neutralswatch.firstChild);

      for (var i = 0; i < neuts.length; i++) {
        // Create and append the new element
        var div = document.createElement('div');
        var ryb = neuts[i];
        var rgb = RXB.ryb2rgb(ryb);
        div.style.display = 'table-cell';
        div.style.backgroundColor = '#' + RXB.rxb2hex(rgb);
        div.style.border = '1px solid #ddd';

        div.setAttribute('data-index', i);
        div.setAttribute('data-ryb-r', ryb[0]);
        div.setAttribute('data-ryb-y', ryb[1]);
        div.setAttribute('data-ryb-b', ryb[2]);
        div.setAttribute('data-rgb-r', rgb[0]);
        div.setAttribute('data-rgb-g', rgb[1]);
        div.setAttribute('data-rgb-b', rgb[2]);
        div.onclick = neutralswatch_onclick;
        neutralswatch.appendChild(div);
      }

      return neutralswatch.childen;
    }
/**
     * Draw neutral spectrum given an HTML element and
     * an RYB hex string or array of count times
     */
Draw neutral spectrum given an HTML element and
an RYB hex string or array of count times
Draw neutral spectrum given an HTML element and an RYB hex string or array of count times
function drawneutral(color, count) {
      var neuts = RXB.neutrals(color, val / 255, count);
      while (neutralswatch.firstChild)
        neutralswatch.removeChild(neutralswatch.firstChild);
      for (var i = 0; i < neuts.length; i++) {
        var div = document.createElement('div');
        var ryb = neuts[i];
        var rgb = RXB.ryb2rgb(ryb);
        div.style.display = 'table-cell';
        div.style.backgroundColor = '#' + RXB.rxb2hex(rgb);
        div.style.border = '1px solid #ddd';
        div.setAttribute('data-index', i);
        div.setAttribute('data-ryb-r', ryb[0]);
        div.setAttribute('data-ryb-y', ryb[1]);
        div.setAttribute('data-ryb-b', ryb[2]);
        div.setAttribute('data-rgb-r', rgb[0]);
        div.setAttribute('data-rgb-g', rgb[1]);
        div.setAttribute('data-rgb-b', rgb[2]);
        div.onclick = neutralswatch_onclick;
        neutralswatch.appendChild(div);
      }
      return neutralswatch.childen;
    }
function drawneutral ( color , count ) { var neuts = RXB . neutrals ( color , val / 255 , count ) ; while ( neutralswatch . firstChild ) neutralswatch . removeChild ( neutralswatch . firstChild ) ; for ( var i = 0 ; i < neuts . length ; i ++ ) { var div = document . createElement ( 'div' ) ; var ryb = neuts [ i ] ; var rgb = RXB . ryb2rgb ( ryb ) ; div . style . display = 'table-cell' ; div . style . backgroundColor = '#' + RXB . rxb2hex ( rgb ) ; div . style . border = '1px solid #ddd' ; div . setAttribute ( 'data-index' , i ) ; div . setAttribute ( 'data-ryb-r' , ryb [ 0 ] ) ; div . setAttribute ( 'data-ryb-y' , ryb [ 1 ] ) ; div . setAttribute ( 'data-ryb-b' , ryb [ 2 ] ) ; div . setAttribute ( 'data-rgb-r' , rgb [ 0 ] ) ; div . setAttribute ( 'data-rgb-g' , rgb [ 1 ] ) ; div . setAttribute ( 'data-rgb-b' , rgb [ 2 ] ) ; div . onclick = neutralswatch_onclick ; neutralswatch . appendChild ( div ) ; } return neutralswatch . childen ; }
Draw neutral spectrum given an HTML element and
 an RYB hex string or array of count times
Draw neutral spectrum given an HTML element and an RYB hex string or array of count times
// Calculate neutrals // clear the div // Create and append the new element