ColorVectorSpace.RGBRGBType
RGBRGB(rr, gr, br, rg, gg, bg, rb, gb, bb)

Represent the tensor product of two RGB values.

Example

jldoctest julia> a, b = RGB(0.2f0, 0.3f0, 0.5f0), RGB(0.77f0, 0.11f0, 0.22f0) (RGB{Float32}(0.2f0,0.3f0,0.5f0), RGB{Float32}(0.77f0,0.11f0,0.22f0))

julia> a ⊗ b RGBRGB{Float32}: 0.154 0.022 0.044 0.231 0.033 0.066 0.385 0.055 0.11

ColorVectorSpace.complementMethod
y = complement(x)

Take the complement 1-x of x. If x is a color with an alpha channel, the alpha channel is left untouched. Don't forget to add a dot when x is an array: complement.(x)

ColorVectorSpace.varmultMethod
varmult(op, itr; corrected::Bool=true, mean=Statistics.mean(itr), dims=:)

Compute the variance of elements of itr, using op as the multiplication operator. The keyword arguments behave identically to those of Statistics.var.

Example

julia> cs = [RGB(0.2, 0.3, 0.4), RGB(0.5, 0.3, 0.2)]
2-element Array{RGB{Float64},1} with eltype RGB{Float64}:
RGB{Float64}(0.2,0.3,0.4)
RGB{Float64}(0.5,0.3,0.2)

julia> varmult(⋅, cs)
0.021666666666666667

julia> varmult(⊙, cs)
RGB{Float64}(0.045,0.0,0.020000000000000004)

julia> varmult(⊗, cs)
RGBRGB{Float64}:
0.045  0.0  -0.03
0.0    0.0   0.0
-0.03   0.0   0.02`