Package RanglaPunjab

Sonia Bhar Ahluwalia

2018-07-27

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 :-)

Functions

  • Rangla Punjab: RanglaPunjab(name)
  • List Palette: ListPalette()
  • Merge Palette: MergePalette(name, name2, name3)
  • Paint Palette: PaintPalette(name, name2, name3)
  • Cherry Pick Palette: CherryPickPalette(name, name2, name3)
  • Show Palette Photo: ShowPalettePhoto(name)
  • Sample Code

  • 3-D Pie Chart
  • Bar Plot
  • Rangla Punjab: RanglaPunjab(name)

    Input 1 palette, return vector of colors

    > RanglaPunjab("GoldenTemple")
    [1] "#bdcad0" "#5f8abf" "#ffd860" "#d88821" "#672006"

    List Palette: 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" 

    Merge Palette: 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"

    Paint Palette: PaintPalette(name, name2, name3)

    Input 1 to 3 palettes to display their colors on screen

    > PaintPalette("FieldsOfPunjab","Jutti","Paranda")

    Paint Palette

    Cherry Pick Palette: 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.

    > CherryPickPalette("GoldenTemple","GoldenTemple2")