Color palettes inspired by Islamic art
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
This post is about my new R package IslamicArt
, which provides color palettes inspired by Islamic art. Disclaimer: While I accept the Islamic theology, ethnically speaking, I’m not from the Middle East, North Africa, Central Asia, South Asia, or Southeast Asia. However, I do deeply appreciate art and philosophy from what’s conventionally known as the Islamic world as well as Sufism. This R package is only about colors, not about theology. The cultural heritage in and of itself does not necessarily comform to the Quran. Therefore, in the documentation of this package, I mean by “Islamic” what’s culturally “Islamic”, not what’s theologically Islamic.
When talking about the Islamic world, the first things that come to people’s mind may be authoritarian third world countries and war. However, the Islamic world is and has been far more than that. Between about 9th century and about 16th century was a golden age of the Islamic world, in which philosophy (“science” was natural philosophy), math, astronomy, physics, and medicine flourished. That was an era when Greek philosophy was translated, intensively studied, and preserved, and through which Europe was introduced to Aristotle and more of Greek philosophy.
Why did the golden age decline, so much so that the Islamic world is so behind in science today? This is complicated. Some blame al-Ghazali for his book Incoherence of Philosophers, that made Muslims dogmatic and closed to rational inquiry. However, this turns out to be a myth, and has been debunked in the book Galileo Goes to Jail: And Other Myths About Science and Religion. Islamic philosophy in fact went on after al-Ghazali, and al-Ghazali in fact advocated for critical thinking in the Incoherence of Philosophers. Some would attribute the decline to the Mongol invasion that lead to the collapse of the Abbasid Empire, so scholars no longer had a place to do research. One theory attributes the decline to Nizamiyya colleges, which focused on religious studies at the expense of scientific (I mean natural philosophy) inquiry, and as a result, becoming religious scholars became more attractive than becoming natural philosophers. In the book Holistic Islam, Mevlevi sheikh Kabir Edmund Helminski suggested that the turning of Islamic scholars from an originally spiritual Islam to legalism lead to the demise of Islamic civilization. The book Lost Islamic History suggests that European colonialists’ authoritarian rule and division of Islamic lands into small portions contributed to the demise of Islamic civilization.
There’re many theories, and there isn’t one single cause to the demise of the Islamic golden age. Anyway, though the golden age is now lost in history, many artifacts from that era are still available for visit, as tourist attractions or as museum exhibits. That’s why I wrote the R package IslamicArt
. This package can’t bring the Islamic golden age back. However, at least it can let us commemorate the history by incorporating color schemes of related historical artifacts, mostly from that period, some earlier and some later, into our statistical graphics.
This package provides color palettes inspired by Islamic art, and can be used both with base R and ggplot2
. These colors are especially useful when visualizing data related to the Islamic world. This package was also inspired by custom palette packages like ochRe
for Australia-inspired palettes and dutchmasters
, palettes derived from 17th century Dutch paintings. I borrowed a lot of code and documentation from ochRe
.
This package is not yet on CRAN, so must be installed this way:
devtools::install_github("lambdamoses/IslamicArt")
library(ggplot2) library(dichromat) library(IslamicArt) theme_set(theme_bw())
These are the palettes in this package:
viz_palettes(islamic_palettes)
Since the colors and their ordering were chosen by hand to recapitulate color orderings in the original artifacts, the colors do NOT correspond to numeric values and using these palettes for continuous values is discouraged. By default, the ggplot2
color scales from this package are discrete.
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point() + scale_color_islamic(palette = "shiraz2")
This palette is derived from a Quran manuscript from Shiraz that made heavy use of gold leaves and blue paint.
ggplot(diamonds, aes(color, fill = clarity)) + geom_bar() + scale_fill_islamic(palette = "samarqand")
This palette is derived from the blue domes, stone walls, dark blue and turquoise tiles, and stone floor from Samarqand, Uzbekistan.
ggplot(diamonds, aes(clarity, fill = color)) + geom_bar(position = "fill") + scale_fill_islamic(palette = "cordoba")
This palette is derived from the horseshoe arches, pillars, and the mihrab (a niche in mosques facing Mecca) in the Grand Mosque of Cordoba.
# Do a continuous one anyway filled.contour(volcano, color.palette = islamic_pal(palette = "jerusalem"), asp = 1)
This palette is derived from colors of Dome of the Rock. Here the top of the volcano is colored like the golden dome, and the lower parts of the volcano are colored like the blue and green tiles, and the very bottom of the volcano is colored like the stone floor surrounding Dome of the Rock.
Here are simulations of how color blindness will affect perception of the palettes. For those who are not color blind, use this section to choose palettes readable by people with color blindness.
# Deutanopia pal_deutan <- lapply(islamic_palettes, dichromat, type = "deutan") viz_palettes(pal_deutan)
# Protanopia pal_protan <- lapply(islamic_palettes, dichromat, type = "protan") viz_palettes(pal_protan)
# Tritanopia pal_tritan <- lapply(islamic_palettes, dichromat, type = "tritan") viz_palettes(pal_tritan)
shiraz
: Nasir al-Mulk Mosque, Shiraz, Iran. https://www.atlasobscura.com/places/nasir-al-mulk-mosqueshiraz2
: The Jerrāḥ Pasha Quran Quran, Shiraz. http://islamic-arts.org/2012/the-morgan-treasures-of-islamic-manuscripts/samarqand
: Shah-i-Zinda Necropolis, Samarqand, Uzbekistan. https://www.flickr.com/photos/danielzolli/1443764917samarqand2
: Bibi-Khanym Mosque tile. https://www.flickr.com/photos/mayhlen/6411406569abu_dhabi
: Sheikh Zayed Grand Mosque, Abu Dhabi, UAE. https://blog.headout.com/sheikh-zayed-grand-mosque-abu-dhabi-tours/istanbul
: Sultan Ahmed Mosque (Blue Mosque) exterior. https://istanbultourstudio.com/things-to-do/blue-mosqueistanbul2
: Blue Mosque interior. https://minoritynomad.com/istanbuls-the-blue-mosque-interior-prayer/istanbul3
: Hagia Sophia interior. Hagia Sophia was built in 537 AD as a cathedral, but after the Ottoman conquest, it was converted into a mosque. Now it’s a museum. https://www.travelandleisure.com/attractions/museums-galleries/hagia-sophia-unique-facts-historykonya
: Mevlana Museum, Konya, Turkey. This is the tomb of Sufi poet Jalal ad-Din Rumi, who founded the Mevlevi Order, known for the whirling dervishes. https://sufism.org/thresholdjerusalem
: Dome of the Rock, Jerusalem. This is one of the earliest Islamic architecture, dating from late 7th century. http://www.flickriver.com/photos/mikeghouse/4045803559/fes
: Panorama of Fes, Morocco. https://www.dreamstime.com/panoramic-view-medina-old-town-fes-morocco-image108882071fes2
: Qarawiyyin University, Fes, Morocco. This is the oldest continuously operating university, which was founded by a Muslim woman called Fatima al-Fihri in 859 AD.alhambra
: al-Andalus (Islamic Spain) style geometric tile. https://www.pinterest.com/pin/566609196846357568/cordoba
: Grand Mosque of Cordoba, Spain. A cathedral was built in the middle of this mosque after Christians reconquered Spain. Now this mosque is no longer operating and is a tourist attraction. https://www.ruralidays.co.uk/blog/mosque-of-cordoba-spain-facts/damascus
: Umayyad Mosque, Damascus, Syria. This is also one of the earliest Islamic architecture, whose style is significantly influenced by Byzantine art. https://depositphotos.com/216371518/stock-photo-umayyad-mosque-damascus-syria.htmlottoman
: Ottoman style tile. https://www.etsy.com/listing/554967554/turkish-ceramic-tile-motif-vector
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.