JuliaAttic / Color.jl

Basic color manipulation utilities.
Other
47 stars 21 forks source link

Convert to parametric types. #51

Closed timholy closed 10 years ago

timholy commented 10 years ago

DO NOT MERGE YET: waiting on https://github.com/JeffBezanson/FixedPoint.jl/pull/2.

This implements #42. Tedious but hopefully well worth it. I also added lots of conversion tests, and this caught at least one missing method.

I'm pretty excited about what this will allow in Images!

timholy commented 10 years ago

OK, I do believe we can merge this.

This is (mildly) breaking. A few situations will likely trigger an error:

Here are the packages that depend on Color.jl, together with what I know about them:

I was intending to submit PRs or at least raise issues in most of these, but it looks like it may not be necessary. Perhaps a brief public service announcement on julia-users would make sense, though.

dcjones commented 10 years ago

This code makes me happy. I love that we're not forced to either make compromises or implement multiple versions of everything, as we would be in many other languages.

timholy commented 10 years ago

Agreed, Julia is very nice that way.

Thanks for merging!

timholy commented 10 years ago

OK if I tag a new version in the next 24 hrs? I'll try to coordinate a new release of Images to go with it, since that's the one clearly-broken package.

dcjones commented 10 years ago

Gadfly tests look good, so it's fine with me.

timholy commented 10 years ago

OK. Since this is breaking, should we increment the minor version?

kmsquire commented 10 years ago

Might want to look closer at PyPlot. Even though there aren't any tests, it does use ColorValues extensively. Cc: @stevengj

stevengj commented 10 years ago

Probably PyPlot will now need to use convert(RGB{Float64}, c::ColorValue) instead of convert(RGB, c). I don't see any other obvious changes that are required, but I will update PyPlot as needed once this is merged.

timholy commented 10 years ago

Thanks, @stevengj

stevengj commented 10 years ago

Actually, it looks like it works as-is, because your fallback convert method is to the Float64 type.

timholy commented 10 years ago

That was the plan, glad to hear it actually worked.

dcjones commented 10 years ago

Tagged 0.3.0