Analyze in R: Create a monochromatic palette. The “tinter” package

RAnalytics
スポンサーリンク

Introducing a package that is useful for creating single-color palettes.

Package version is 0.1.0. Checked with R version 4.1.2.

スポンサーリンク

Install Package

Run the following command.

#Install Package
install.packages("tinter")
#Installation of the scales package if necessary
#install.packages("scales")

Example

See the command and package help for details.

#Loading the library
library("tinter")

#Create a single color palette: tiner command
#Specify a base color: x option
#Number of colors to create around a base color: steps option
#Direction for creating light and dark: direction option; tints,shades,both
TinCol <- tinter(x = "#008b8b", steps = 5, direction = "both")
#Plot
scales::show_col(TinCol, labels = TRUE, borders = "#a87963")

#Lighten: lighten command
#Specify the amount of adjustment:mount option; specify with 0-1
LtTinCol <- lighten(x = TinCol, amount = .5)
scales::show_col(LtTinCol, labels = TRUE, borders = "#a87963")

#darken: darken command
DkTinCol <- darken(x = TinCol, amount = .5)
scales::show_col(DkTinCol, labels = TRUE, borders = "#a87963")

Output Example

・tiner command

・lighten command

・darken command


I hope this makes your analysis a little easier !!

Amazon audibleの登録の紹介

プライム会員限定で2024年7月22日まで3か月無料体験キャンペーン開催中です。無料体験後は月額1,500円で聞き放題です。なお、聞き放題対象外の本はAudible会員であれば非会員価格の30%引きで購入することが可能です。

Amazon audibleはプロのナレーターが朗読した本をアプリで聞くことができるサービスで、オフライン再生も可能です。通勤や作業のお供にAmazon audibleのご登録はいかがでしょうか。

・AmazonのAudible

https://amzn.to/3L4FI5o

Copied title and URL