Package: colourspace 0.1.1
colourspace: Convert from One Colour Space to Another, Print a Ready-to-Paste Modern 'CSS' Syntax
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/>.
Authors:
colourspace_0.1.1.tar.gz
colourspace_0.1.1.zip(r-4.7-any)colourspace_0.1.1.zip(r-4.6-any)colourspace_0.1.1.zip(r-4.5-any)
colourspace_0.1.1.tgz(r-4.6-any)colourspace_0.1.1.tgz(r-4.5-any)
colourspace_0.1.1.tar.gz(r-4.7-any)colourspace_0.1.1.tar.gz(r-4.6-any)
colourspace_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
colourspace/json (API)
| # Install 'colourspace' in R: |
| install.packages('colourspace', repos = c('https://iamyannc.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/iamyannc/colourspace/issues
- color_map - Precomputed colour map for nearest-name lookup
- color_names - CSS color names to HEX mapping
Last updated from:6996fd82ec. Checks:9 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | OK | 147 | ||
| source / vignettes | OK | 171 | ||
| linux-release | OK | 94 | ||
| macos-release | OK | 133 | ||
| macos-oldrel | OK | 184 | ||
| windows-devel | OK | 95 | ||
| windows-release | OK | 69 | ||
| windows-oldrel | OK | 74 | ||
| wasm-release | OK | 94 |
Exports:convert_colourspacefrom_csshex_to_hslhex_to_namehex_to_oklabhex_to_oklchhex_to_rgbhsl_to_hexname_to_hexoklab_to_hexoklch_to_hexrgb_to_hexto_css
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Precomputed colour map for nearest-name lookup | color_map |
| CSS color names to HEX mapping | color_names |
| Convert between colour spaces | convert_colourspace |
| Parse CSS color strings | from_css |
| Convert HEX to HSL | hex_to_hsl |
| Convert HEX to colour name | hex_to_name |
| Convert HEX to OKLAB | hex_to_oklab |
| Convert HEX to OKLCH | hex_to_oklch |
| Convert HEX to RGB | hex_to_rgb |
| Convert HSL to HEX | hsl_to_hex |
| Convert colour name to HEX | name_to_hex |
| Convert OKLAB to HEX | oklab_to_hex |
| Convert OKLCH to HEX | oklch_to_hex |
| Convert RGB to HEX | rgb_to_hex |
| Format colours as modern CSS color functions | to_css |
