diff --git a/src/ColorVectorSpace.jl b/src/ColorVectorSpace.jl index cf1bfbe..0173b5d 100644 --- a/src/ColorVectorSpace.jl +++ b/src/ColorVectorSpace.jl @@ -70,7 +70,9 @@ for f in (:mod, :rem, :mod1) end # Real values are treated like grays -ColorTypes.gray(x::Real) = x +if !hasmethod(gray, (Number,)) + ColorTypes.gray(x::Real) = x +end dotc(x::T, y::T) where {T<:Real} = acc(x)*acc(y) dotc(x::Real, y::Real) = dotc(promote(x, y)...)