text: var t=require("../generator/color").colorGenerator,r=require("matercolors"),e=require("color-blind"),o=require("../utility"),n=o.cymk,i=o.rgb,s=o.hwb,h=o.hsl;module.exports.Cono=function(o){void 0===o&&(o="en"),this.lang=o,this.colors=t(this.lang),this.chosenColors={},this._nearestCono=require("nearest-color").from(t(this.lang)),Object.defineProperty(this,"hex",{get:function(){return this.currentColor}}),Object.defineProperty(this,"rgb",{get:function(){return i(this.currentColor)}}),Object.defineProperty(this,"hwb",{get:function(){return s(this.currentColor)}}),Object.defineProperty(this,"hsl",{get:function(){return h(this.currentColor)}}),Object.defineProperty(this,"cymk",{get:function(){return n(this.currentColor)}}),this.withColor=function(t){if(this.colors.hasOwnProperty(t))return this.currentColor=this.colors[t],this.currentName=t,this;throw new SyntaxError("Input Colour String does not follow Naming Convention.")},this.makePalette=function(){return new r(this.currentColor)},this.withColorBlindness=function(t){return this.findNearest(e[t](this.currentColor))},this.withSubstring=function(t){for(var r=Object.keys(this.colors).filter(function(r){return r.includes(t)}),e=0,o=r.length;e<o;e++)this.chosenColors[r[e]]=this.colors[r[e]];return this},this.makePalettes=function(){var t=this;return Object.keys(this.chosenColors).map(function(e){var o={};return o[e]=new r(t.chosenColors[e]),o}).reduce(function(t,r){return Object.assign(t,r)},{})},this.withColorBlindnesses=function(t){for(var r=0,o=Object.entries(this.chosenColors);r<o.length;r++){var n=o[r];this.chosenColors[n[0]]=e[t](n[1])}return this},this.findNearest=function(t){var r=this._nearestCono(t);return this.currentColor=r.value,this.currentName=r.name,this}};
  //# sourceMappingURL=cono.module.js.map
  