diff --git a/chroma/README.md b/chroma/README.md new file mode 100644 index 000000000..9482236b3 --- /dev/null +++ b/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 +``` diff --git a/chroma/build.boot b/chroma/build.boot new file mode 100644 index 000000000..aa119d6e2 --- /dev/null +++ b/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))) diff --git a/chroma/resources/cljsjs/chroma/common/chroma.ext.js b/chroma/resources/cljsjs/chroma/common/chroma.ext.js new file mode 100644 index 000000000..c28488c8a --- /dev/null +++ b/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 () {} +};