Giter Site home page Giter Site logo

citron's Introduction

citRon: Jacquemus-themed colour palettes for Sarah's MPhil thesis

Jacquemus is a French fashion label headed by Simon Porte Jacquemus that has achieved cult status over the past couple of years thanks to its whimsical, casual styles and eyebrow-raising accessories (the most famous being a tiny bag incapable of holding much more than a single key). I love how the label uses bold colours, and found inspiration in Jacquemus' Spring '19 and '20 collections when coming up with a colour palette for my thesis plots.

Citrus fruits often feature as props in Jacquemus editorials, and Jacquemus himself owns a cafe called "Citron", hence the package name citRon ("lemon" in English).

citRon includes a qualitative palette, a diverging palette, and various gradient palettes. Particular shades have been chosen because I have been lead to believe that I have chosen shades and combinations that are colourblind-friendly, but I am more than happy to entertain any suggestions or tweaks that could be made.

These palettes have been constructed with a specific use in mind, especially citron_grad_blue8, so do keep in mind that these will not always be useful or attractive for your circumstances.

This package, including the format of this vignette, has been copied-and-edited from the ochRe package by Holly Kirk et. al.

# ochRe can be downloaded here:
devtools::install_github("ropenscilabs/ochRe")
# Load the citRon vignette
vignette("citRon")

Installation

To install citRon from GitHub:

# A reminder that you need to install the 'devtools' package first.
devtools::install_github("beeysian/citRon")

To load the library:

library(citRon)

The Palettes

pal_names <- names(citron_palettes)
par(mfrow = c(length(citron_palettes)/2, 2), lheight = 2, mar = rep(1, 4), adj = 0)
for (i in 1:length(citron_palettes)){
    viz_palette(citron_palettes[[i]], pal_names[i])
}

Example

The default palette is the qualitative palette.

library(citRon)
library(ggplot2)
ggplot(diamonds) + geom_bar(aes(x = cut, fill = clarity)) +
  scale_fill_citron()

The order that colours appear can be reversed by setting reverse = FALSE. Below is the qualitative palette reversed:

library(citRon)
library(ggplot2)
ggplot(diamonds) + geom_bar(aes(x = cut, fill = clarity)) +
  scale_fill_citron(reverse = FALSE)

You can change the colour palette used within scale_fill_citron(). Below is the diverging palette.

library(citRon)
library(ggplot2)
ggplot(diamonds) + geom_bar(aes(x = cut, fill = clarity)) +
  scale_fill_citron(palette = "citron_div")

Here's the purple-yellow gradient palette using scale_colour_citron() instead. Isn't it pretty?

library(citRon)
library(ggplot2)
ggplot(diamonds) + geom_point(aes(x = carat, y = price, color = clarity)) +
  scale_colour_citron(palette = "citron_grad")

citron's People

Contributors

beeysian avatar

Stargazers

Roberto Salas avatar Adam H. Sparks avatar Nicholas Tierney avatar

Watchers

 avatar

Forkers

njtierney

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.