complementary-colors:获得互补色

  • D9_248137
    了解作者
  • 4.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 03:30
    上传日期
补色 获得互补色。 分期付款 $ npm install complementary-colors 用法 var complementaryColors = require ( 'complementary-colors' ) ; 建设者 var myColor = new compColors ( '#00ff00' ) ; 吸气剂 所有示例中的基础颜色为#00ff00 基本的 返回原始颜色作为rgb对象。 myColor . primary ( ) ; // returns // [ { r: 0, g: 255, b: 0 } ] 互补配色方案 互补色是在基本色轮上彼此完全相对放置的任何两种色相。 返回带有两个rgb颜色对象的数组。 myColor . complementary ( ) ; // Returns // [ { r: 0, g: 255, b: 0 }, {
complementary-colors-master.zip
  • complementary-colors-master
  • index.js
    1.5KB
  • package.json
    543B
  • .github
  • workflows
  • publish.yml
    320B
  • LICENSE
    1.1KB
  • .gitignore
    529B
  • README.md
    2.9KB
内容介绍
# complementary-colors [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d6b2147ade304ed286ae1324673f7c06)](https://app.codacy.com/app/etoxin/complementary-colors?utm_source=github.com&utm_medium=referral&utm_content=etoxin/complementary-colors&utm_campaign=Badge_Grade_Dashboard) Get complementary colors. ## Installtion ```console $ npm install complementary-colors ``` ## Usage ```js var complementaryColors = require('complementary-colors'); ``` ## Constructors ```js var myColor = new compColors('#00ff00'); ``` ## Getters Base color in all examples is `#00ff00` ### Primary Returns the original color as a rgb object. ```js myColor.primary(); // returns // [ { r: 0, g: 255, b: 0 } ] ``` ### Complementary color scheme Complementary Colors are any two Hues positioned exactly opposite each other on the Basic Color Wheel. Returns an array with two rgb color objects. ```js myColor.complementary(); // Returns // [ { r: 0, g: 255, b: 0 }, { r: 255, g: 0, b: 255 } ] ``` ### Triadic color scheme A triadic color scheme uses three colors that are evenly spaced around the color wheel. Triadic color harmonies tend to be quite vibrant, even if you use pale or unsaturated versions of your hues. Returns an array with three rgb color objects. ```js myColor.triad(); // Returns // [ { r: 0, g: 255, b: 0 }, // { r: 0, g: 0, b: 255 }, // { r: 255, g: 0, b: 0 } ] ``` ### Square color scheme The square color scheme is similar to the Triadic, but with all four colors spaced evenly around the color circle. Returns an array with four rgb color objects. ```js myColor.square(); // Returns // [ { r: 0, g: 255, b: 0 }, // { r: 0, g: 127, b: 255 }, // { r: 255, g: 128, b: 0 }, // { r: 255, g: 0, b: 255 } ] ``` ### Analogous color scheme Analogous color schemes use colors that are next to each other on the color wheel. Returns an array with three rgb color objects. ```js myColor.analogous(); // returns // [ { r: 128, g: 255, b: 0 }, // { r: 128, g: 255, b: 0 }, // { r: 0, g: 255, b: 0 } ] ``` ### Split-Complementary color scheme The split-complementary color scheme is a variation of the complementary color scheme. In addition to the base color, it uses the two colors adjacent to its complement. Returns an array with three rgb color objects. ```js myColor.splitComplementary(); // returns // [ { r: 0, g: 255, b: 0 }, // { r: 128, g: 255, b: 0 }, // { r: 0, g: 255, b: 0 } ] ``` ### Rectangle (tetradic) color scheme The rectangle or tetradic color scheme uses four colors arranged into two complementary pairs. ```js myColor.tetradic(); // returns // [ { r: 0, g: 255, b: 0 }, // { r: 0, g: 127, b: 255 }, // { r: 255, g: 128, b: 0 }, // { r: 127, g: 0, b: 255 } ] ``` # Examples ```js var compColors = require('complementary-colors'); var myColor = new compColors('#00ff00'); console.log(myColor.complementary()); // Returns // [ { r: 0, g: 255, b: 0 }, { r: 255, g: 0, b: 255 } ] ```
评论
    相关推荐
    • npm
      npm install 编译和热重装以进行开发 npm run serve 编译并最小化生产 npm run build 运行测试 npm run test 整理和修复文件 npm run lint 运行单元测试 npm run test:unit 自定义配置 请参阅。
    • npm-max:NPM软件包
      最大NPM 该函数返回最大值 npm install
    • npm-exercises
      npm-exercises
    • npmTest:测试npm
      npmTest 测试npm
    • npm-lifecycle:npm生命周期脚本运行器
      npm v7发布后,将不建议使用此模块。 请不要绝对依赖它。 npm v7中使用的生命周期脚本运行程序是 。 请继续使用该模块。 npm-lifecycle 是一个独立的库,用于执行软件包的生命周期脚本。 它是从npm本身提取的,...
    • TSProjectDemo:npm ts
      TSProjectDemo:npm ts
    • npmd-install
      npmd 安装 从 npmd-resolve 树安装节点模块。 npm install - g npmd - resolve npmd - install npmd - resolve browserify | npmd - install 另外, 一个关键部分 执照 麻省理工学院
    • npm-cli-login
      npm-cli-login 允许您不使用STDIN,STDOUT登录到NPM。 在CI构建系统等地方使用。 还可以在〜/ .npmrc文件中创建/修改条目以进行身份​​验证。 安装 npm install -g npm-cli-login 使用-g标志通过CLI使用npm-cli-...
    • npm-practice
      npm-practice
    • npm:测试
      npm 测试