Skip to content

Colour Palettes for Data

1packages dependsuggested by 2
34.9Kdownloads / year
83.6%test coverage
13/13flavors OK

Overview

About

Colour palettes for data, based on some well known public data sets. Includes helper functions to map absolute values to known palettes, and capture the work of image colour mapping as raster data sets.

Changes in 0.5.0
  • Fixed a long-standing bug in sst_pal(), chl_pal(), ice_pal(), and bathy_deep_pal(): data values below the first palette break were silently dropped from the output (a zero index from findInterval()), shortening the result and misaligning colours. Out of range values now clamp to the end colours and output length always matches input length.
  • The absolute palettes now share one internal worker abs_pal(), unifying alpha handling and the n-colours/data/palette/function modes. The function mode (pal()) now respects alpha.
  • New function image_hex() converts matrices and arrays (1-band palette, grey+alpha, RGB, RGBA, raw, logical, character) to a matrix of hex colours. This is the colour engine shared with the {ximage} package, with robust handling of missing, non-finite, and constant data.
Show all changes in 0.5.0Hide the rest of the changes in 0.5.0
  • New stretch functions stretch_linear(), stretch_log(), stretch_sqrt(), and stretch_histeq() rescale data to [0, 1] ahead of colour mapping, based on experience with Sentinel-2. They preserve matrix/array dimensions, map constant input to 0.5, return NA for non-finite input, and accept absolute bounds via lim for scene-independent stretches.
  • New function dirty_pal() for global bathymetry/topography (AAD underway, DiRT). Follows the standard palr palette modes.
  • d_pal() and image_pal() now map constant data to a mid-palette colour instead of returning NA.
  • Tests moved to testthat edition 3, fixed a test that used the magrittr pipe without it being available.
  • Removed unused Suggests of viridis, removed large blocks of commented-out legacy code.
  • Fixed deprecated usage of structure() thanks to CRAN.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.5 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-12
  • NOTE11 OK, 2 NOTE2026-07-16
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.5.0
READMEYes · 221 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 0.5.0Citation fileNoWebsiteYes · pkgdown
Help pages
13includes a package overview page
Examples that run
92%11 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
97%
Return-value docs
100%
Help pages citing references
38%

Downloads

34.9K
CRAN downloads in the past year
Rank #2,493 · ~96/day · ~2.9K/mo
Daily download trend is not available in this view yet.
2.2K30 days
6.5K90 days
34.9K1 year
Compare downloads with other packages →
Also on115 r2u1 autocran4.3K conda_forge

Repository

3Stars
0Forks
5Open issues
0Open PRs
1Releases
126Commits
3Commit identities
126 commits · Last activity 2026-08-05
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
2
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2021-11-07 · 32026-07-07 · 3
PracticesBeta

10 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/australianantarcticdivision/palr on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Code of conduct
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-08-05 · The repository has a site deploy workflow

pkgdown site last built 2026-08-05

Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 1 practice
CRAN release process (2)
cran-comments.mdrevdep/
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing palr adds no packages beyond those that come with R.

Depends (1)
R >= 3.6.0
Imports (1)
grDevices
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
1indirect
Imports 1
Suggested by 2
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (4)
Author, Maintainer since 0.0-4 (2015), Copyright holder
Contributor · added in 0.1.0
source code of image.default
Contributor · added in 0.1.0
Named the package
Contributor · added in 0.1.0
Provided colours for element_pal
Releases (7)

Pick two releases to compare their code metrics.

  • 0.5.0Latest
    record
    2026-08-05 · current release · diff ↗ ·
    added 6 exports
    dirty_pal, image_hex, stretch_histeq, stretch_linear, stretch_log, stretch_sqrt
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.4.0
    record
    2023-11-06 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.3.0
    record
    2021-05-05 · diff ↗ ·
    added 2 exports
    d_pal, data_pal
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.0
    record
    2020-01-30 · diff ↗
  • 0.1.0
    record
    2019-11-07 · diff ↗ ·
    added 7 exports
    bathy_deep_pal, chl_pal, ice_pal, image_pal, image_raster, image_stars, sst_pal
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • 0.0.6
    record
    2016-07-27 · diff ↗ ·
    added 2 exports
    bathyDeepPal, mk_timePal
Show 3 earlier eventsHide 3 earlier events
  • R
    R 3.3.0 released · 2016-05-03
  • 0.0-4
    record
    2015-06-11
  • R
    R 3.2.0 released · 2015-04-16

Package metadata

First published
2015-06-11
Total releases
7 / 11 yrs
License
GPL-3 OSI
Minimum R
≥ 3.6.0
Bundled data
46 KB / 2 files
Download size
236 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("palr")
Sumner, M. D., R Core Team and contributors worldwide, Proctor, A., & Remenyi, T. (2026). palr: Colour Palettes for Data (Version 0.5.0) [Computer software]. https://doi.org/10.32614/CRAN.package.palr

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for palr version 0.5.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy