View Source Image.Color (image v0.2.0)
Functions to manage image color and color conversion.
Link to this section Summary
Functions
Returns a mapping from CSS color names to CSS hex values and RGB triplets as a list.
Returns the list of color profiles built into
libvips
.
Guards whether a given value can be interpreted as a color value.
Guards whether a given profile is one of the inbuilt profiles.
Returns a boolean indicating if the given profile is known and can be used for image operations.
Link to this section Types
@type icc_profile() :: :none | :cmyk | :srgb | :p3 | Path.t()
Reference to an ICC color profile
:none
means no profile:cmyk
,:srgb
and:p3
refer to the built-in color profilesPath.t()
means any file system path. If the path is a relative path then is will be loaded from the systems profile directory.
@type rgb_color() :: [number()]
An rbg color expressed as a list of numbers.
The number of list elements and the type varies depending on the image format, colorspace and dimensions.
For a common sRGB
image it will be a list of
three of four images. If the fourth number is provided
it will be considered as an alpha transparency band.
Link to this section Functions
Returns a mapping from CSS color names to CSS hex values and RGB triplets as a list.
Returns the list of color profiles built into
libvips
.
Guards whether a given value can be interpreted as a color value.
Guards whether a given profile is one of the inbuilt profiles.
Returns a boolean indicating if the given profile is known and can be used for image operations.