sortPalettes: Sort palettes in order of brightness

Description Usage Arguments Value Examples

Description

This function sorts a vector of palettes in rough order of brightness (using the sum of each component in a palette as its brightness).

Usage

1
sortPalettes(palettes)

Arguments

palettes

A list of palettes.

Value

A sorted list of palettes, in brighness order.

Examples

1
2
3
4
5
6
7
palettes<-list(data.frame(red=c(0.1, 0.2, 0.9), green=c(0.4, 0.5, 0.9),
blue=c(0.7, 0.8, 0.9)),
data.frame(red=c(0.1, 0.2, 0.3), green=c(0.4, 0.5, 0.6),
blue=c(0.7, 0.8, 0.9)),
data.frame(red=c(0.1, 0.2, 0.1), green=c(0.4, 0.5, 0.1),
blue=c(0.7, 0.8, 0.1)))
sorted<-sortPalettes(palettes)

CulturalAnalytics documentation built on May 2, 2019, 5:24 p.m.