Color palette of “KARADA-GOOD”. The color palette consists of five colors selected from photographs of Japanese landscapes and foods. Color palette will be added sequentially.
Color palettes to be added are introduced on Instagrame from time to time.
You can install the development version of KaradaColor from GitHub with:
# install.packages("devtools")
::install_github("KaradaGood/KaradaColor") devtools
library(KaradaColor)
#Display all palettes in console
kg_show_consol()
#Plot the palette
kg_plot_color("Kyoto_City", n = 10, showcode = TRUE)
#Create complementary color
kg_plot_color(color = kg_create_cc())
#Create triad color
kg_plot_color(color = kg_create_tc())
The package contains colour scale functions for
scale_color_kg()
and scale_fill_kg()
. Missing
values are initially displayed in red.
#Continuous scale exsample
if(!require("tidyverse", quietly = TRUE)){
install.packages("tidyverse");require("tidyverse")
}set.seed(1)
<- LETTERS[1:20]
x <- paste0("var", seq(1,20))
y <- expand.grid(X=x, Y=y)
data $Z <- sample(c(NA, rnorm(15)), 20, replace = TRUE)
datalibrary("tidyverse")
ggplot(data, aes(X, Y, fill= Z)) +
geom_tile() +
scale_fill_kg(discrete = FALSE, name = "Hanamushiro",
alpha = 1, na.value = "red")
#Discrete scale exsample
library("ggplot2")
ggplot(data = diamonds, aes(x = cut, y = price,
color = cut, fill = cut)) +
geom_boxplot() +
scale_color_kg(name = "Hanamushiro", alpha = 0.3) +
scale_fill_kg(name = "Hokkaido_Sky", alpha = 1) +
theme_dark()
This can be done with the kg_get_color() command.
library("aRtsy")
set.seed(1234)
canvas_strokes(colors = kg_get_color(name = "Otaru_Unga"),
neighbors = 1, p = 0.02, iterations = 1,
resolution = 350)