Skip to contents

Print the result from a call to qualpal.

Usage

# S3 method for qualpal
print(x, colorspace = c("HSL", "DIN99d", "RGB"), digits = 2, ...)

Arguments

x

An object of class "qualpal".

colorspace

Color space to print colors in.

digits

Number of significant digits for the output. (See print.default.) Setting it to NULL uses getOption("digits").

...

Arguments to pass to print.default.

Value

Prints the colors as a matrix in the specified color space as well as a distance matrix of the color differences. Invisibly returns x.

Examples

f <- qualpal(3)
print(f, colorspace = "DIN99d", digits = 3)
#> ---------------------------------------- 
#> Colors in the DIN99d color space 
#> 
#>         L(99d) a(99d) b(99d)
#> #C96C69   60.0   28.8   10.4
#> #6E9DCE   66.8  -13.1  -21.9
#> #9FCB6A   79.3  -17.2   28.2
#> 
#>  ---------------------------------------- 
#> DIN99d color difference distance matrix 
#> 
#>         #C96C69 #6E9DCE
#> #6E9DCE    24.3        
#> #9FCB6A    24.1    23.8