January 2020
Intermediate to advanced
532 pages
13h 31m
English
ColorTypes.jl is a package that defines various data types that represent colors. In practice, there are many ways in which a color can be defined: Red-Green-Blue (RGB), Hue-Saturation-Value (HSV), and so on. Most of the time, a color can be defined using three real numbers. In the case of grayscale, only a single number is required to represent the level of darkness. To support transparent colors, an additional value can be used to store an opacity value. First, let's take a look at the type definitions:
""" `Colorant{T,N}` is the abstract super-type of all types in ColorTypes, and refers to both (opaque) colors and colors-with-transparency (alpha channel) information. `T` is the element type (extractable ...
Read now
Unlock full access