dist/bbn.js
/**
     * Returns the hex color of the given rgb or color name.
     * @method   colorToHex
     * @global   
     * @example 
     * ```javascript
     * //"#ff0000"
     * bbn.fn.colorToHex('red');
     * ```
     * 
     * @example 
     * ```javascript
     * //"#ff0000"
     * bbn.fn.colorToHex('rgb(255,0,0)');
     * ```
     * @memberof bbn.fn
     * @returns  {String} 
     */
Returns the hex color of the given rgb or color name.


Returns the hex color of the given rgb or color name .
colorToHex(color){
      let canvas = document.createElement("canvas").getContext("2d");
	    canvas.fillStyle = color;
	    return canvas.fillStyle;
    }
colorToHex ( color ) { let canvas = document . createElement ( "canvas" ) . getContext ( "2d" ) ; canvas . fillStyle = color ; return canvas . fillStyle ; }
Returns the hex color of the given rgb or color name.
Returns the hex color of the given rgb or color name .