Skip to content

Commit

Permalink
Merge pull request #515 from levitanong/chromajs
Browse files Browse the repository at this point in the history
adds chroma
  • Loading branch information
Deraen committed Apr 13, 2016
2 parents 2e01816 + bd2eb7b commit 57ba589
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
18 changes: 18 additions & 0 deletions chroma/README.md
@@ -0,0 +1,18 @@
# cljsjs/chroma

[](dependency)
```clojure
[cljsjs/chroma "1.1.1-0"] ;; latest release
```

[](/dependency)
```clojure
(ns application.core
(:require cljsjs.chroma :as [chroma]))

(-> (js/chroma "#D4F880")
(.darken)
(.hex))

;; #9BC04B
```
28 changes: 28 additions & 0 deletions chroma/build.boot
@@ -0,0 +1,28 @@
(set-env!
:resource-paths #{"resources"}
:dependencies '[[cljsjs/boot-cljsjs "0.5.1" :scope "test"]])

(require '[cljsjs.boot-cljsjs.packaging :refer :all])

(def +lib-version+ "1.1.1")
(def +version+ (str +lib-version+ "-0"))

(task-options!
pom {:project 'cljsjs/chroma
:version +version+
:description "A lightweight but powerful library for dealing with colors"
:url "http://gka.github.io/chroma.js/"
:scm {:url "https://github.com/cljsjs/packages"}
:license {"BSD" "http://opensource.org/licenses/BSD-3-Clause"}})

(deftask package []
(comp
(download :url (str "https://github.com/gka/chroma.js/archive/v" +lib-version+ ".zip")
:checksum "d19a64f11d845700c5e5c4a647882404"
:unzip true)
(sift :move {#"chroma.js" "cljsjs/chroma/development/chroma.inc.js"
#"chroma.min.js" "cljsjs/chroma/production/chroma.min.inc.js"})
(sift :include #{#"^cljsjs"})
(deps-cljs :name "cljsjs.chroma")
(pom)
(jar)))
40 changes: 40 additions & 0 deletions chroma/resources/cljsjs/chroma/common/chroma.ext.js
@@ -0,0 +1,40 @@
var chroma = {
"version": {},
"_input": {},
"brewer": {},
"colors": {},
"lab": function () {},
"bezier": function () {},
"cubehelix": function () {},
"random": function () {},
"rgb": function () {},
"hex": function () {},
"hsl": function () {},
"hsv": function () {},
"num": function () {},
"css": function () {},
"lch": function () {},
"hcl": function () {},
"cmyk": function () {},
"gl": function () {},
"interpolate": function () {},
"mix": function () {},
"kelvin": function () {},
"temperature": function () {},
"contrast": function () {},
"blend": {
"normal": function () {},
"multiply": function () {},
"screen": function () {},
"overlay": function () {},
"darken": function () {},
"lighten": function () {},
"dodge": function () {},
"burn": function () {}
},
"analyze": function () {},
"scale": function () {},
"scales": {},
"limits": function () {},
"hsi": function () {}
};

0 comments on commit 57ba589

Please sign in to comment.