-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
66 lines (45 loc) · 1.84 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
output:
md_document:
variant: markdown_github
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "figure/",
fig.height = 1
)
```
# Animated Palettes
Recycled code from [Karthik Ram's `wesanderson` palette](https://github.com/karthik/wesanderson)
with inspiration from [DL Miller's `beyonce` palette](https://github.com/dill/beyonce)
**Note**: Where as previously mentioned paletts used a different method for generating themed color palettes. I have opted for a different approach. I brief I used movie barcodes (in which every frame of a movie is shrunk to a couple pixel wide line), I then took the top 10 (using a k-means algorithm [palette generator](https://palettegenerator.com/)) most represented colors.
Using this approach I have generated color palettes that represent the most dominant colors of a given movie.
However, I am not sure I like the results all that much, I am working on implementing a better method for generating color palettes that better refects the artisticly dominant colors of a movie. So please check back at some point.
## Installation
```r
devtools::install_github("Eomesodermin/animated", force = TRUE)
```
## Usage
```{r, Usage, eval=FALSE, echo=TRUE}
# Load library
library("animated")
# List of all palettes currently available can be found using
names(animated_palettes)
# To call a specific palette use
animated("Aladdin")
# All current palettes are n = 10
# to interpolate more colors for a specific palette use
animated("Aladdin", 21, type = "continuous")
```
## Palettes
```{r, all_palettes, echo=FALSE, eval = TRUE}
library("animated")
for(i in 1:length(animated_palettes)){
print(animated(paste0(names(animated_palettes[i]))))
}
```