References
Types
CMYKColorTypes.AbstractCMYK
— TypeAbstractCMYK{T} <: Color{T, 4}
Abstract supertype for opaque CMYK color types.
CMYKColorTypes.TransparentCMYK
— TypeTransparentCMYK{C <: AbstractCMYK, T} = TransparentColor{C, T, 5}
An alias for the abstract supertype for transparent CMYK color types.
CMYKColorTypes.AbstractACMYK
— TypeAbstractACMYK{C <: AbstractCMYK, T} = AlphaColor{C, T, 5}
An alias for the abstract supertype for CMYK color types with alpha stored first.
CMYKColorTypes.AbstractCMYKA
— TypeAbstractCMYKA{C <: AbstractCMYK, T} = ColorAlpha{C, T, 5}
An alias for the abstract supertype for CMYK color types with alpha stored last.
CMYKColorTypes.CMYK
— TypeCMYK{T <: Fractional} <: AbstractCMYK{T}
CMYK
is a general type for representing process color (i.e. cyan, magenta, yellow and black). For each component value, 0
means 0% ink density and 1
means 100% ink density.
CMYKColorTypes.ACMYK
— TypeACMYK{T <: Fractional} <: AbstractACMYK{CMYK{T}, T}
ACMYK
is a transparent color variant of CMYK
. ACMYK
stores the alpha component first, but its constructors always take the alpha component last, i.e. in order of (cyan, magenta, yellow, black, alpha).
CMYKColorTypes.CMYKA
— TypeCMYKA{T <: Fractional} <: AbstractCMYKA{CMYK{T}, T}
CMYKA
is a transparent color variant of CMYK
. ACMYK
stores the alpha component last. See also ACMYK
.
Traits
CMYKColorTypes.cyan
— Functioncyan(c)
Returns the cyan component of an AbstractCMYK
or TransparentCMYK
color.
CMYKColorTypes.magenta
— Functionmagenta(c)
Returns the magenta component of an AbstractCMYK
or TransparentCMYK
color.
CMYKColorTypes.yellow
— Functionyellow(c)
Returns the yellow component of an AbstractCMYK
or TransparentCMYK
color.
CMYKColorTypes.black
— Functionblack(c)
Returns the black component of an AbstractCMYK
or TransparentCMYK
color.
CMYKColorTypes.complement
— FunctionCMYKColorTypes.complement(c)
Return the color with the color components of the complement (i.e. 1 - compN(c)
). If c
is a TransparentCMYK
, the alpha component is left untouched.
This function has the same functionality as ColorVectorSpace.complement
. Therefore, if you are using ColorVectorSpace
, you do not need to specify the module name explicitly. Also, to avoid name collisions, do not (re-)export this function.
Examples
julia> CMYKColorTypes.complement(CMYKA(0.0, 0.2, 0.5, 0.75, 0.7)) # keeping the alpha
CMYKA{Float64}(1.0, 0.8, 0.5, 0.25, 0.7)
CMYKColorTypes.total_ink_coverage
— Functiontotal_ink_coverage(c::AbstractCMYK)
Returns the total ink coverage (TIC), or the total amount of cyan, magenta, yellow, and black inks in percentage. Although not exact, this value is often used as a substitute for the total area coverage (TAC). This function cannot be used for TransparentCMYK
colors, because the physical meaning is unclear.
Examples
julia> total_ink_coverage(CMYK{Float32}(1.0, 0.3, 0.2, 0.0))
150.0f0
Others
CMYKColorTypes.naively_convert
— Functionnaively_convert(::Type{<:Color}, c::Colorant)
naively_convert(::Type{<:TransparentColor}, c::Colorant[, alpha])
Convert color types using the "naive" algorithm for RGB <–> CMYK conversions defined in CSS Color Module Level 4 (Working Draft).
This methods yields very different results from conversions based on practical color profiles for printed materials.