title: How with bootstrap-colorpicker to get selected color only in format “#ffffff”?
body: <p>In my laravel 5.8 / "bootstrap": "^4.0.0" app I use
  I use bootstrap-colorpicker with sample :
  <a href="https://itsjavi.com/bootstrap-colorpicker/tutorial-p02_Advanced_Examples.html" rel="nofollow noreferrer">https://itsjavi.com/bootstrap-colorpicker/tutorial-p02_Advanced_Examples.html</a></p>
  
  <p>and I want selecting color from picker always to get selected color in format “#ffffff”.
  But the problem is that periodically got value in rgb format : <a href="https://prnt.sc/rwqlqj" rel="nofollow noreferrer">https://prnt.sc/rwqlqj</a>
  Looks like it happens when I click on outer block selection.
  Are there some options to get selected color only in format “#ffffff” ?</p>
  
  <p>I tried the example in link above like :</p>
  
  <pre><code>$('#cp_color').colorpicker({ 
      popover: false,
      inline: false,
      container: true,
  })
  
      .on('colorpickerChange colorpickerCreate', function (e) {
          var colors = e.color.generate('tetrad');
  
          colors.forEach(function (color, i) {
              var colorStr = color.string(),
                  swatch = e.colorpicker.picker
                      .find('.colorpicker-swatch[data-name="tetrad' + (i + 1) + '"]');
  
              swatch
                  .attr('data-value', colorStr)
                  .attr('title', colorStr)
                  .find('&gt; i')
                  .css('background-color', colorStr);
          });
      })
  ;
  </code></pre>
  
  <p>But failed and peridically I goy invalid rgb value.</p>
  
  <p>How to get selected color only in format “#ffffff” ?
  Thanks!</p>