Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_colors

Get colors for plotting functions


Description

This is a helper function that provides hex color codes for jtools, interactions, and perhaps other packages.

Usage

get_colors(colors, num.colors = 1, reverse = FALSE, gradient = FALSE)

Arguments

colors

The name of the desired color class or a vector of colors. See details of jtools_colors.

num.colors

How many colors should be returned? Default is 1.

reverse

Should the colors be returned in reverse order, compared to normal? Default is FALSE.

gradient

Return endpoints for a gradient? Default is FALSE. If TRUE, num.colors is ignored.


jtools

Analysis and Presentation of Social Scientific Data

v2.1.3
MIT + file LICENSE
Authors
Jacob A. Long [aut, cre] (<https://orcid.org/0000-0002-1582-6214>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.