Skip to content

Instantly share code, notes, and snippets.

@EmilHvitfeldt
Created February 4, 2021 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EmilHvitfeldt/7daa57156a6e844423942ed1daf0d175 to your computer and use it in GitHub Desktop.
Save EmilHvitfeldt/7daa57156a6e844423942ed1daf0d175 to your computer and use it in GitHub Desktop.
xaringancolor css example
---
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
ratio: "7:5"
highlightLines: true
countIncrementalSlides: false
---
<div style = "position:fixed; visibility: hidden">
$$\require{color}\definecolor{yellow}{rgb}{1, 0.8, 0.16078431372549}$$
$$\require{color}\definecolor{orange}{rgb}{0.96078431372549, 0.525490196078431, 0.203921568627451}$$
$$\require{color}\definecolor{green}{rgb}{0, 0.474509803921569, 0.396078431372549}$$
</div>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
yellow: ["{\\color{yellow}{#1}}", 1],
orange: ["{\\color{orange}{#1}}", 1],
green: ["{\\color{green}{#1}}", 1]
},
loader: {load: ['[tex]/color']},
tex: {packages: {'[+]': ['color']}}
}
});
</script>
<style>
.yellow {color: #FFCC29;}
.orange {color: #F58634;}
.green {color: #007965;}
</style>
```{r flair_color, echo=FALSE}
library(flair)
yellow <- "#FFCC29"
orange <- "#F58634"
green <- "#007965"
```
# This .yellow[header] is a little yellow
And some of the normal text is .orange[orange] and .green[green]
.yellow[Nam sit amet viverra urna]. .orange[Vivamus et sem placerat, elementum mauris ac, ullamcorper neque]. .green[Duis sit amet ex at dolor venenatis facilisis eget sed enim]. Vestibulum eget ex fermentum, gravida nunc ut, volutpat arcu. Proin tincidunt ac ligula sed molestie. .yellow[Sed non magna ullamcorper, .green[hendrerit] tortor id, pulvinar sapien]. Duis ornare suscipit quam sit amet pretium. Quisque ex justo, facilisis eu consequat vel, volutpat vel mi. Nunc sollicitudin tellus quis nulla blandit, in iaculis elit ornare. Donec congue viverra neque eget viverra. Vestibulum ac odio id urna sagittis volutpat. Sed molestie urna sit amet varius aliquam.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment