https://github.com/emilhvitfeldt/prismatic
color manipulation R package Simply and Tidy
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.8%) to scientific vocabulary
Keywords
color
color-manipulation
colour
r
rstats
Keywords from Contributors
shiny
color-palette
documentation-tool
palettes
leaflet-map
Last synced: 6 months ago
·
JSON representation
Repository
color manipulation R package Simply and Tidy
Basic Info
- Host: GitHub
- Owner: EmilHvitfeldt
- License: other
- Language: R
- Default Branch: main
- Homepage: https://emilhvitfeldt.github.io/prismatic/
- Size: 5.65 MB
Statistics
- Stars: 139
- Watchers: 3
- Forks: 6
- Open Issues: 2
- Releases: 6
Topics
color
color-manipulation
colour
r
rstats
Created over 6 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
License
Code of conduct
README.Rmd
---
output: github_document
---
```{r opts, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# prismatic
[](https://github.com/EmilHvitfeldt/prismatic/actions)
[](https://app.codecov.io/gh/EmilHvitfeldt/prismatic?branch=main)
[](https://CRAN.R-project.org/package=prismatic)
[](https://CRAN.R-project.org/package=prismatic)
[](https://lifecycle.r-lib.org/articles/stages.html)
[](https://zenodo.org/record/4420786)
The goal of prismatic is to provide color manipulation tools in R, in an intuitive, low-dependency and functional way.
- **intuitive** All the working functions are prefixed with `clr_` (**c**o**l**o**r**) allowing for easy autocompletion.
- **low-dependency** Only depends on [farver](https://github.com/thomasp85/farver).
- **functional** All functions have consistent inputs and outputs and are thus fully pipeable.
## Installation
You can install the released version of prismatic from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("prismatic")
```
And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("EmilHvitfeldt/prismatic")
```
## Examples
All **prismatic** function return a `colors` object, which includes a new printing method and plotting method for quickly visualizing the colors.
```{r terraincols, dpi=320}
library(prismatic)
terrain10 <- terrain.colors(10)
terrain10
terrain_color <- color(terrain10)
terrain_color
plot(terrain_color)
```
If [cli](https://github.com/r-lib/cli) is available the print method will do its best to represent the colors.

```{r plotcols, dpi=320}
ddd <- color(terrain.colors(10))
ddd
plot(ddd)
clr_grayscale(ddd) |> plot()
clr_lighten(ddd, 0.7) |> plot()
clr_darken(ddd, 0.5) |> plot()
clr_saturate(ddd, 0.5) |> plot()
clr_desaturate(ddd, 0.5) |> plot()
clr_negate(ddd) |> plot()
clr_rotate(ddd, 180) |> plot()
clr_protan(ddd) |> plot()
clr_tritan(ddd) |> plot()
clr_deutan(ddd) |> plot()
```
## Related work
This package is hugely inspired by the JavaScript library [Qix-/color](https://github.com/Qix-/color).
## Code of Conduct
Please note that the **prismatic** project is released with a [Contributor Code of Conduct](https://github.com/EmilHvitfeldt/prismatic/blob/main/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
Owner
- Name: Emil Hvitfeldt
- Login: EmilHvitfeldt
- Kind: user
- Location: California
- Company: @posit-dev
- Website: https://www.emilhvitfeldt.com/
- Repositories: 27
- Profile: https://github.com/EmilHvitfeldt
All things @tidymodels
GitHub Events
Total
- Issues event: 2
- Watch event: 2
- Issue comment event: 2
- Push event: 2
- Pull request event: 2
- Fork event: 2
Last Year
- Issues event: 2
- Watch event: 2
- Issue comment event: 2
- Push event: 2
- Pull request event: 2
- Fork event: 2
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| EmilHvitfeldt | e****t@g****m | 105 |
| Garrick Aden-Buie | g****k@a****m | 6 |
| xx02al | l****n@g****h | 4 |
| Jack Davison | 4****n | 3 |
| olivroy | 5****y | 1 |
| Darío Hereñú | m****a@g****m | 1 |
Committer Domains (Top 20 + Academic)
gmx.ch: 1
adenbuie.com: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 26
- Total pull requests: 11
- Average time to close issues: 20 days
- Average time to close pull requests: about 11 hours
- Total issue authors: 8
- Total pull request authors: 6
- Average comments per issue: 1.0
- Average comments per pull request: 0.55
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 2
- Average time to close issues: 23 days
- Average time to close pull requests: 4 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 1.0
- Average comments per pull request: 0.5
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- EmilHvitfeldt (13)
- hadley (4)
- malcolmbarrett (2)
- thomasp85 (2)
- sharlagelfand (1)
- xx02al (1)
- njtierney (1)
- trangdata (1)
Pull Request Authors
- EmilHvitfeldt (7)
- jack-davison (3)
- xx02al (2)
- olivroy (2)
- kant (1)
- gadenbuie (1)
Top Labels
Issue Labels
feature (2)
bug (2)
enhancement (1)
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- cran 138,039 last-month
- Total docker downloads: 11,564
-
Total dependent packages: 7
(may contain duplicates) -
Total dependent repositories: 10
(may contain duplicates) - Total versions: 22
- Total maintainers: 1
proxy.golang.org: github.com/emilhvitfeldt/prismatic
- Documentation: https://pkg.go.dev/github.com/emilhvitfeldt/prismatic#section-documentation
- License: other
-
Latest release: v1.1.2
published almost 2 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
6 months ago
proxy.golang.org: github.com/EmilHvitfeldt/prismatic
- Documentation: https://pkg.go.dev/github.com/EmilHvitfeldt/prismatic#section-documentation
- License: other
-
Latest release: v1.1.2
published almost 2 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
6 months ago
cran.r-project.org: prismatic
Color Manipulation Tools
- Homepage: https://emilhvitfeldt.github.io/prismatic/
- Documentation: http://cran.r-project.org/web/packages/prismatic/prismatic.pdf
- License: MIT + file LICENSE
-
Latest release: 1.1.2
published almost 2 years ago
Rankings
Stargazers count: 3.1%
Downloads: 3.4%
Dependent packages count: 8.2%
Dependent repos count: 9.2%
Average: 9.5%
Forks count: 12.2%
Docker downloads count: 21.1%
Maintainers (1)
Last synced:
6 months ago
conda-forge.org: r-prismatic
- Homepage: https://github.com/EmilHvitfeldt/prismatic
- License: MIT
-
Latest release: 1.1.1
published over 3 years ago
Rankings
Dependent packages count: 19.5%
Stargazers count: 28.5%
Dependent repos count: 34.0%
Average: 34.0%
Forks count: 54.2%
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.2 depends
- farver >= 2.0.1 imports
- grDevices * imports
- graphics * imports
- covr * suggests
- crayon * suggests
- testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite