weightcolor: Fade colours according to a weight vector

View source: R/colours.R

weightcolorR Documentation

Fade colours according to a weight vector

Description

The colours whose weights are less than 1 are diluted. Colours whose weight is zero are returned as white, other weights are grouped in nlevels groups and colours diluted proportionally.

Usage

weightcolor(col, weights, nlevels = 5)

Arguments

col

A vector of colour

weights

A vector of weights, values between 0 and 1

nlevels

The number of groups

Value

A vector of colours


condvis2 documentation built on Sept. 14, 2022, 5:06 p.m.