ColorVectorSpace.jl
ColorVectorSpace.jl copied to clipboard
Treat colors as if they are n-vectors for the purposes of arithmetic
This adds a `Complement{C,T,N}` type. The complement is to be interpreted as a lazy `complement`. Math on `Complement` affects its underlying `Colorant`.
From [discourse](https://discourse.julialang.org/t/arithmetic-on-colors/85297/12?u=stevengj): ```jl julia> using Colors, ColorVectorSpace, LinearAlgebra, FixedPointNumbers julia> norm(RGB(0.008,0.008,0.008)) 0.008 julia> norm(RGB{N0f8}(0.008,0.008,0.008)) # spurious underflow 0.0 ``` We typically expect `norm` to avoid spurious underflow. It looks like...
We currently don't have bool operators `!`, `&`, `|` for `Gray{Bool}` object ```julia julia> !Gray(true) ERROR: MethodError: no method matching !(::Gray{Bool}) ```
```julia julia> using Statistics julia> varmult(*, [1]) 0.0 julia> var([1]) NaN ```
In ColorTypes v0.12, the definitions of `one` and `AbstractGray` have (will be) changed. Also, as of ColorTypes v0.11, some methods have been migrated from this package to ColorTypes. For these...
This is related to issue #56, #148, and https://github.com/JuliaGraphics/ColorTypes.jl/issues/235. I think the following return types are reasonable and leave little room for debate. ```julia julia> RGB24(1) * 1.0 RGB{Float64}(1.0,1.0,1.0) julia>...
I haven't made up my mind about what the return type should be if the definition of `one` for Colorant types is the real number `1`. (cf. https://github.com/JuliaGraphics/ColorTypes.jl/issues/235) I found...
I'd like to move the whole JuliaImages stack to version numbers >= 1.0 (see JuliaImages/Images.jl#825). Let's use this issue to collect plans for breaking changes in the near future. Items...
```julia julia> versioninfo() Julia Version 1.5.0 Commit 96786e22cc (2020-08-01 23:44 UTC) Platform Info: OS: macOS (x86_64-apple-darwin18.7.0) CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-9.0.1 (ORCJIT,...
`sum`ing over an `Array{UInt8}` automatically promotes to `UInt64` to prevent overflow. yet doing so over an `Array{Gray{UFixed{UInt8}}}` does not. would be nice if these behaved similarly. ``` julia> using ColorVectorSpace...