R code that defines color palettes based on the unique, vibrant culture of Punjab, India.
Rangla Punjab translates to “Colorful Punjab”.
And if you ever visit India, Rangla Punjab is a wonderful Punjabi theme village of generations gone by.
In the meantime, enjoy this R package :-)
RanglaPunjab(name)
ListPalette()
MergePalette(name, name2, name3)
PaintPalette(name, name2, name3)
CherryPickPalette(name, name2, name3)
ShowPalettePhoto(name)
RanglaPunjab(name)
Input 1 palette, return vector of colors
ListPalette()
Lists all 24 palettes
> ListPalette()
 [1] "FieldsOfPunjab"       "FieldsOfPunjab2"        "GoldenTemple"           "GoldenTemple2"         
 [5] "Pindh"                "Haveli"                 "Haveli2"                "AmritsariKulcha"       
 [9] "CholeBhature"         "BiryaniRice"            "AmritsariLassi"         "AmritsariPedeWaliLassi"
[13] "Kulfi"                "SohniMahiwal"           "HeerRanjha"             "Gidha"                 
[17] "Gidha2"               "Teej"                   "Phulkari"               "Phulkari2"             
[21] "Jutti"                "Jutti2"                 "Jutti3"                 "Paranda" MergePalette(name, name2, name3)
Input 2 to 3 palettes to merge into new palette
MergePalette("AmritsariKulcha", "Phulkari2")
[1] "#e3e4d9" "#ebdc9c" "#b3340e" "#67140a" "#2a231d" "#9c1a41" "#42a4e8" "#3a35da" "#ee523c" "#3e167c"PaintPalette(name, name2, name3)
Input 1 to 3 palettes to display their colors on screen
CherryPickPalette(name, name2, name3)
Input 2 to 3 palettes to visually select colors to create new palette. Will open interactive shiny app and save list of colors tocherrypickedpalette.
ShowPalettePhoto(name)
Input 1 palette to display photo that inspired these colors
Use RanglaPunjab to color pie charts.
library(RanglaPunjab)
library(plotrix)
slices <- c(10, 12, 4, 16, 8) 
lbls <- c("US", "UK", "Australia", "Germany", "France")
pie3D(slices,labels=lbls, explode=0.1, col=RanglaPunjab("Gidha"), main="Pie Chart of Countries ")Use CherryPickPalette to dynamically color bar plots.
library(RanglaPunjab)
counts <- table(mtcars$vs, mtcars$gear)
barplot(counts, main="Car Distribution by Gears and VS",
        xlab="Number of Gears", col=CherryPickPalette("Teej","Jutti"),
        legend = rownames(counts))