cyclic_hcl: Cyclic HCL Color Palettes

Description Usage Arguments Details Value Examples

View source: R/cyclic_hcl.R

Description

Depricated - this function has been replaced with helper functions

Usage

1
2
3
4
5
cyclic_hcl(n.cycles = 10, cycle.lenth = 100, h = c(0, -100), c = 100,
  l = 100, cycle.h = 0, cycle.c = 50, cycle.l = c(75, 25), alpha = 1,
  h.power = 1, c.power = 1, l.power = 1, cycle.h.power = 1,
  cycle.c.power = 1, cycle.l.power = 0.5, terminate = TRUE,
  cycle.right = TRUE, stepped = FALSE, fixup = FALSE)

Arguments

n.cycles

Numeric. Number of cycles, or bins. Default: 10

cycle.lenth

Integer. Number of colors per cycle or bin. Default: 100

h

Numeric. Hue (0 to 360); constant or 2-vector giving palette endpoints. Default: c(0,-100)

c

Numeric. Chroma (0 to ~100); constant or 2-vector giving palette endpoints. Default: 100

l

Numeric. Lightness (0 to ~100); constant or 2-vector giving palette endpoints. Default: 100

cycle.h

Numeric. Hue offset (0 to 360); constant or 2-vector giving cycle endpoints. Default: 0

cycle.c

Numeric. Chroma; constant or 2-vector giving cycle endpoints. Default: c(50,50)

cycle.l

Numeric. Lightness; constant or 2-vector giving cycle endpoints. Default: c(75,25)

alpha

Numeric. Opacity; constant. Default: 1. (Note: alpha applies to enire palette for now. In future releases, alpha cycling will be allowed.)

h.power

Numeric. Default: 1

c.power

Numeric. Default: 1

l.power

Numeric. Default: 1

cycle.h.power

Numeric. Default: 1

cycle.c.power

Numeric. Default: 1

cycle.l.power

Numeric. Default: 0.5

terminate

Logical. If TRUE the palette is closed (left and right closed) by adding a single color at either the left or right end . If right = TRUE, then terminate = TRUE adds a color before the first cycle. If right = FALSE, then terminate = TRUE adds a color after the last cycle. If terminate=FALSE the palette remains open at one end. Default: TRUE

cycle.right

Logical. If cycle.right=TRUE, the cycles are considered right-closed (left open) intervals. This only has a practical effect if terminate = TRUE. Default: TRUE.

stepped

Logical. Not used. Default: FALSE. Future releases will allow for stepped vs cyclic transitions.

fixup

Logical. Out-of-gammut colors are converted to valid RGB colors if fixup=TRUE, and NA strings if fixup=FALSE. Default: FALSE.

Details

cyclic_hcl() constructs palettes combining end-to-end linear interpolation with cycles in hue (H), lightness (L) and or chroma (C).

Palette characteristics:

Value

Character vector. A vector of RGB colors specified as hex color codes (#RRGGBB).

Examples

1
2
3
## Palette with linear hue, cyclical lightness, constant chroma.
palette.linH.cycL  <- cyclic_hcl()
colorbar(palette.linH.cycL)

allopole/datacolor documentation built on May 4, 2019, 6:39 p.m.