gifts-15

Day 15 – little helper sci_palette

Jakob Gepp Blog

We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it will be much easier to share and improve those functions, if they are within a package. Up till the 24th December I will present one function each day from helfRlein. So, on the 15th day of Christmas my true love gave to me…

door-15-sci-palette

What can it do?

This little helper returns a set of colors which we often use at STATWORX. So, if – like me – you cannot remeber each hex color code you need, this might help. Of course these are our colours, but you could rewrite it with your own palette. But the main benefactor is the plotting method – so you can see the color instead of only reading the hex code.

How to use it?

To see which hex code corresponds to which colour and for what purpose to use it

sci_palette()
main_color accent_color_1 accent_color_2 accent_color_3    highlight        black 
 "#013848"      "#0085AF"      "#00A378"      "#09557F"    "#FF8000"    "#000000" 
      text         grey_2     light_gray        special 
 "#696969"      "#D9D9D9"      "#F8F8F8"      "#C62F4B" 
attr(,"class")
[1] "sci"

As mentioned above, there is a plot() method which gives the following picture.

plot(sci_palette())

day-15-sci-palette

Overview

To see all the other functions you can either check out our GitHub or you can read about them here.

Have a merry advent season!

Über den Autor
Jakob Gepp

Jakob Gepp

Numbers were always my passion and as a data scientist and a statistician at STATWORX I can fullfill my nerdy needs. Also I am responsable for our blog. So if you have any questions or suggestions, just send me an email!

ABOUT US


STATWORX
is a consulting company for data science, statistics, machine learning and artificial intelligence located in Frankfurt, Zurich and Vienna. Sign up for our NEWSLETTER and receive reads and treats from the world of data science and AI. If you have questions or suggestions, please write us an e-mail addressed to blog(at)statworx.com.