0.2.1 • Published 8 years ago
jinjin v0.2.1
jinjin
installation
use npm or yarn
npm i jinjin -S // use npm
yarn add jinjin // use yarnin es6
import jin from "jinjin"use script
<script src="./node_modules/jin/jin.js" />how to run example
npm run dev.eg // use npm
yarn dev.eg // use yarnapi
jin
you can import from "jinjin" in common js , for use script tag and jin have already explored to window.
typefunctioninput(String) color code of hex / (Number, Number, Number) r, g, breturnColor instance usage
let white = jin("#fff")
let black = jin(0, 0, 0)setHSB
typefunctioninputObject ({h, s, b})returnColor instance
(class) Color
properties:
rgbObject ({r, g, b})hsbObject ({h, s, b})
run test
npm test // use npm
yarn test // use yarnjin(55, 31, 116).setHSB({h: this.hsb.h++}) // get color of 1 degree greater than the former in hue