The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Package {okcolors}


Type: Package
Title: A Set of Color Palettes Inspired by OK Go Music Videos for 'ggplot2' in R
Version: 0.1.2
Description: A collection of aesthetically appealing color palettes for effective data visualization with 'ggplot2'. Palettes support both discrete and continuous data.
License: GPL-3
Encoding: UTF-8
Imports: ggplot2 (≥ 3.0.0)
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown
URL: https://github.com/nelsonquesado/okcolors
BugReports: https://github.com/nelsonquesado/okcolors/issues
Depends: R (≥ 3.5.0)
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-07-02 12:41:32 UTC; nelsonquesado
Author: Nelson de O. Quesado Filho [aut, cre], Ana Flávia Teles Silveira [aut]
Maintainer: Nelson de O. Quesado Filho <nquesado@gmail.com>
Repository: CRAN
Date/Publication: 2026-07-02 13:00:02 UTC

Retrieve an okcolors Palette

Description

Returns n colors from a palette included in okcolors.

Usage

okcolors(palette = "obsession", n = 5, direction = 1)

Arguments

palette

Character. Name of the palette to use. See valid_palettes() for available options. Default is "obsession".

n

Integer. Number of colors to return. Default is 5.

direction

Integer. Use 1 for the palette order or -1 to reverse it. Default is 1.

Value

A character vector of hex color codes of length n.

Examples

okcolors("stone", 3)
okcolors("obsession", 7, direction = -1)


Custom ggplot2 Color Scale Using okcolors Palettes

Description

Applies a custom continuous or discrete color scale to ggplot2 plots using a selected okcolors palette.

Usage

scale_color_okcolors(
  palette = "obsession",
  discrete = FALSE,
  direction = 1,
  ...
)

Arguments

palette

Character. Name of the palette to use. See valid_palettes() for available options. Default is "obsession".

discrete

Logical. Whether to use a discrete scale (TRUE) or a continuous scale (FALSE). Default is FALSE.

direction

Integer. Use 1 for the palette order or -1 to reverse it. Default is 1.

...

Additional arguments passed to ggplot2::discrete_scale() or ggplot2::scale_color_gradientn().

Value

A Scale object that can be added to a ggplot2 plot.


Custom ggplot2 Fill Scale Using okcolors Palettes

Description

Applies a custom continuous or discrete fill scale to ggplot2 plots using a selected okcolors palette.

Usage

scale_fill_okcolors(
  palette = "obsession",
  discrete = FALSE,
  direction = 1,
  ...
)

Arguments

palette

Character. Name of the palette to use. See valid_palettes() for available options. Default is "obsession".

discrete

Logical. Whether to use a discrete scale (TRUE) or a continuous scale (FALSE). Default is FALSE.

direction

Integer. Use 1 for the palette order or -1 to reverse it. Default is 1.

...

Additional arguments passed to ggplot2::discrete_scale() or ggplot2::scale_fill_gradientn().

Value

A Scale object that can be added to a ggplot2 plot.


List Available Palettes in okcolors

Description

Returns a character vector of all valid palette names supported by the okcolors package.

Usage

valid_palettes()

Value

A character vector with the names of available palettes.

Examples

valid_palettes()

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.