Re: [julia-users] Re: Computing colors of molecules with Julia

2014-08-25 Thread Steven G. Johnson
This is now implemented in Color.jl; not tagged yet, but you can of course do Pkg.checkout(Color) Fun thing to try: using Interact, Color @manipulate for m = 1:50, n = 1:100 RGB[RGB(i/m,j/n,0) for i=1:m, j=1:n] end On Monday, June 9, 2014 2:07:22 PM UTC-4, Stefan Karpinski wrote: That

Re: [julia-users] Re: Computing colors of molecules with Julia

2014-08-25 Thread Yakir Gagnon
wow, that Interact package is interesting... I guess I'll have to start using IJulia then. I'm still stuck with a Vim session and a Julia terminal. I tried the checkout version of Color, and it's the same (see attached), i.e. wrong: the blues should be close to the 400 mark and the reds closer to

Re: [julia-users] Re: Computing colors of molecules with Julia

2014-08-25 Thread Yakir Gagnon
Oh sorry, I vaguely mentioned it in my first reply. The short answer is: using Color,Images n = 500 wl1 = 380. wl2 = 780. wl = linspace(wl1,wl2,n) I = Array(Float64,n,n,3) for i = 1:n xyz = colormatch(wl[i]) rgb = convert(RGB,xyz) for (j,f) in enumerate([:r,:g,:b]) I[i,:,j] =

Re: [julia-users] Re: Computing colors of molecules with Julia

2014-08-25 Thread Daniel Jones
I looked into xcolor, and the color matching function they implement is only a rough approximation (page 55 of the xcolor manual), whereas Color.jl actually matches wavelengths to the CIE standard observer measurements. In this case, I think Color is more correct. Here's someone else's plot

Re: [julia-users] Re: Computing colors of molecules with Julia

2014-08-25 Thread Yakir Gagnon
Stand corrected. See attached image for a comparison between the three scales we've discussed. The one in the background is the Julia one, the one on the bottom is the one you showed from Wikipedia, and the one on top is the one from xcolor. You can see that the point where Julia disagrees most

[julia-users] Re: Computing colors of molecules with Julia

2014-06-09 Thread Mike Innes
This is really cool. It looks like there are still some issues with syntax highlighting in these notebooks (breaking on triple quoted strings, highlighting unicode characters as errors for example) but this situation should improve greatly once my CodeMirror mode is ready for IJulia. On