Skip to content

colourspace

0.1.1Package record

Convert from One Colour Space to Another, Print a Ready-to-Paste Modern 'CSS' Syntax

0packages depend
3.4Kdownloads / year
94.1%test coverage
13/13flavors OK

Overview

About

Provides a comprehensive 'API' for colour conversion between popular colour spaces ('RGB', 'HSL', 'OKLab', 'OKLch', 'hex', and named colours) along with clean, modern 'CSS' Color Level 4 syntax output. Integrates seamlessly into 'Shiny' and 'Quarto' workflows. Includes nearest colour name lookup powered by a curated database of over 30,000 colour names. 'OKLab'/'OKLCh' colour spaces are described in Ottosson (2020) https://bottosson.github.io/posts/oklab/. 'CSS' Color Level 4 syntax follows the W3C specification https://www.w3.org/TR/css-color-4/.

Changes in 0.1.1

CSS output accuracy

  • Numeric precision increased from 3 to 4 decimal places.
  • Achromatic colors (zero chroma) now use none for hue, per CSS Color Level 4 spec.
  • Alpha omitted when equal to 1 (full opacity is the CSS default).
  • from_css() now parses the none keyword.

Fallback redesign

  • fallback argument changed from TRUE/FALSE to "all", "r", or "none".
  • fallback = "r" returns the nearest R built-in colour name (from grDevices::colors()).
  • distance argument removed from all functions. Lab distance is used internally.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-03-10
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 212 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.1Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
15
Examples that run
100%13 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

3.4K
CRAN downloads in the past year
Rank #10,679 · ~9/day · ~283/mo
Daily download trend is not available in this view yet.
37230 days
97490 days
3.4K1 year
Compare downloads with other packages →
Also on113 r2u10 autocran

Repository

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

Releases over time

2026-02-14 · 12026-07-07 · 2
PracticesBeta

6 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/iamyannc/colourspace on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

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

Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)

Installing colourspace adds 2 packages (2 with compiled code, 1.3 MB of source tarballs). Heaviest: farver 1.2 MB, RANN 59 KB.

Depends (1)
R >= 3.5
Imports (2)
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.0.1 (2026)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.1Latest
    record
    2026-03-23 · current release · diff ↗
  • 0.0.1
    record
    2026-03-04
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-03-04
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5
Bundled data
2.2 MB / 2 files
Download size
2.3 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("colourspace")
Cohen, Y. (2026). colourspace: Convert from One Colour Space to Another, Print a Ready-to-Paste Modern 'CSS' Syntax (Version 0.1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.colourspace

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 colourspace version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, 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