nl_tokens: IS COLOR // FUNCTION : isColor ( value [ mode ] ) Validates if a value is a hexadecimal color .
pl_tokens: function isColor ( value , mode ) { if ( ! isString ( value ) ) { return false ; } if ( arguments . length === 1 || mode === 'full' ) { return re . test ( <mask> ) ; } if ( mode === 'shorthand' ) { return re . shorthand . test ( value ) ; } if ( mode === 'either' ) { return re . either . test ( value ) ; } throw new TypeError ( 'invalid input argument. Unrecognized/unsupported validation mode. Value: `' + mode + '`.' ) ; }