字符串到颜色:任何对象的时不变色 源码
字符串颜色 从任何字符串或任何对象生成时不变色。 安装 npm install string-to-color yarn add string-to-color 演示版 用法 const stc = require ( 'string-to-color' ) ; const color = stc ( 'string' ) ; // => "#7f1de4" 或者只是从任何对象生成颜色,甚至是null! const color = stc ( null ) ; // => "#1ad64b" 另一个功能是,当您的字符串包含颜色名称时,输出将或多或少等于该颜色 const color =
下载地址
用户评论