
R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Polychrome)
> 
> tem <- tema <- 1:12
> names(tem) <- paste("C", 1:12, sep='')
> all(Polychrome:::xform(tem) == Polychrome:::xform(tem))
[1] TRUE
> 
> tem <- topo.colors(12, alpha=0.6)
> all(tem == Polychrome:::xform(tem, alpha=TRUE))
[1] TRUE
> 
> suppressWarnings( RNGversion("3.5.0") )
> set.seed(236746)
> tem <- sample(colors(), 12)
> Polychrome:::xform(tem)
       X1        X2        X3        X4        X5        X6        X7        X8 
"#CD2626" "#030303" "#707070" "#A3A3A3" "#36648B" "#CAFF70" "#EEA2AD" "#E8E8E8" 
       X9       X10       X11       X12 
"#454545" "#EECBAD" "#1E90FF" "#8B3A3A" 
> Polychrome:::xform(tem, alpha=TRUE)
         X1          X2          X3          X4          X5          X6 
"#CD2626FF" "#030303FF" "#707070FF" "#A3A3A3FF" "#36648BFF" "#CAFF70FF" 
         X7          X8          X9         X10         X11         X12 
"#EEA2ADFF" "#E8E8E8FF" "#454545FF" "#EECBADFF" "#1E90FFFF" "#8B3A3AFF" 
> 
> ### make sure we just have color names here to test the auto conversion
> tem
 [1] "firebrick3"      "grey1"           "grey44"          "gray64"         
 [5] "steelblue4"      "darkolivegreen1" "lightpink2"      "gray91"         
 [9] "grey27"          "peachpuff2"      "dodgerblue1"     "indianred4"     
> 
> swatch(tem)
> ranswatch(tem)
> rancurves(tem)
> ranpoints(tem)
> uvscatter(tem)
> luminance(tem)
> plothc(tem)
> plotpc(tem)
> swatchHue(tem)
> swatchLuminance(tem)
> 
> round(computeDistances(tem), 1)
   X1   X11    X6    X2    X8   X12    X5    X3    X7   X10    X4    X9 
205.5 205.5 169.6 122.3  88.5  68.6  57.8  42.2  40.8  35.4  19.8  18.0 
> plotDistances(tem, pch=16)
> 
> colorNames(tem)
 [1] "firebrick3"      "gray1"           "gray44"          "gray64"         
 [5] "steelblue4"      "darkolivegreen1" "lightpink2"      "gray91"         
 [9] "gray27"          "peachpuff2"      "dodgerblue"      "indianred4"     
> isccNames(tem)
 [1] "Vivid_Red"              "Black"                  "Medium_Gray"           
 [4] "Light_Gray"             "Moderate_Blue"          "Brilliant_Yellow_Green"
 [7] "Vivid_Pink"             "Bluish_White"           "Dark_Gray"             
[10] "Pale_Orange_Yellow"     "Brilliant_Blue"         "Moderate_Red"          
> 
> 
> proc.time()
   user  system elapsed 
   0.23    0.06    0.31 
