Tint v1.0.0-rc.0 Tint.CMYK View Source
A color in the CMYK (cyan, magenta, yellow, key) colorspace.
Link to this section Summary
Functions
Converts a tuple containing cyan, magenta, yellow and key color parts into a
Tint.CMYK
struct.
Builds a new CMYK color from cyan, magenta, yellow and key color parts. Please always use this function to build a new CMYK color.
Converts CMYK color into a tuple containing the cyan, magenta, yellow and key parts.
Link to this section Types
Link to this section Functions
Link to this function
from_tuple(arg)
View Source
from_tuple(arg)
View Source
from_tuple(
{cyan :: float() | Decimal.decimal(), magenta :: float() | Decimal.decimal(),
yellow :: float() | Decimal.decimal(), key :: float() | Decimal.decimal()}
) :: t()
from_tuple( {cyan :: float() | Decimal.decimal(), magenta :: float() | Decimal.decimal(), yellow :: float() | Decimal.decimal(), key :: float() | Decimal.decimal()} ) :: t()
Converts a tuple containing cyan, magenta, yellow and key color parts into a
Tint.CMYK
struct.
Link to this function
new(cyan, magenta, yellow, key)
View Source
new(cyan, magenta, yellow, key)
View Source
new(
float() | Decimal.decimal(),
float() | Decimal.decimal(),
float() | Decimal.decimal(),
float() | Decimal.decimal()
) :: t()
new( float() | Decimal.decimal(), float() | Decimal.decimal(), float() | Decimal.decimal(), float() | Decimal.decimal() ) :: t()
Builds a new CMYK color from cyan, magenta, yellow and key color parts. Please always use this function to build a new CMYK color.
Examples
iex> Tint.CMYK.new(0.06, 0.32, 0.8846, 0.23)
#Tint.CMYK<6%,32%,88.4%,23%>
iex> Tint.CMYK.new(0.06, 3.2, 0.8846, 0.23)
** (Tint.OutOfRangeError) Value 3.2 is out of range [0,1]
Link to this function
to_tuple(color) View Source
Converts CMYK color into a tuple containing the cyan, magenta, yellow and key parts.