So console.log(chroma.scale(['white', 'black']).colors(2));
produces ["#00000", "#ffffff"]
in JS as expected
In a bREPL: ((.-colors ((.-scale js/chroma) ["white" "black"])) 2)
produces
#object[TypeError TypeError: a is undefined]
No stacktrace available.
In fact, any argument larger than 1
at the end produces that error.
Can be reproduced with https://github.com/talexand/hallo-color
A JS sketch I've been using to verify my ported functions as I go, with the expected JS output logged: https://tonicdev.com/57b52d0f7b3754140064e49c/57b535eead6238140016554b
Is there something more I can do to figure this bug out? Thanks. This packaging setup has been pretty exciting.
wild guess, worth a try:
clojure
(-> js/chroma
(.scale #js["white" "black"])
(.colors 2))
Couldn’t make the thread form work, but...
hallo-color.app=> ((.-colors ((.-scale js/chroma) #js["white" "black"])) 2)
#js ["#ffffff" "#000000"]
hallo-color.app=> ((.-colors ((.-scale js/chroma) ["white" "black"])) 2)
#object[TypeError TypeError: a is undefined]
No stacktrace available.