-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.qmd
More file actions
147 lines (125 loc) · 3.12 KB
/
example.qmd
File metadata and controls
147 lines (125 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
title: "Preview Colour Example"
subtitle: "Quarto Extension"
author:
- name: "Mickaël CANOUIL, _Ph.D._"
orcid: "0000-0002-3396-4549"
url: "https://mickael.canouil.fr"
format:
html:
output-file: index
toc: true
typst:
output-file: preview-colour-typst
papersize: a4
margin:
x: 2.5cm
y: 2.5cm
pdf-xelatex:
output-file: preview-colour-xelatex
papersize: a4
margin:
x: 2.5cm
y: 2.5cm
pdf-lualatex:
output-file: preview-colour-lualatex
pdf-engine: lualatex
papersize: a4
margin:
x: 2.5cm
y: 2.5cm
pdf-pdflatex:
output-file: preview-colour-pdflatex
pdf-engine: lualatex
papersize: a4
margin:
x: 2.5cm
y: 2.5cm
revealjs:
output-file: preview-colour-revealjs
shift-heading-level-by: -1
beamer:
output-file: preview-colour-beamer
aspectratio: 169
docx:
output-file: preview-colour-docx
pptx:
output-file: preview-colour-pptx
format-links:
- html
- typst
- format: pdf-xelatex
text: "PDF (XeLaTeX)"
- format: pdf-lualatex
text: "PDF (LuaLaTeX)"
- format: pdf-pdflatex
text: "PDF (PDFLaTeX)"
- revealjs
- beamer
- docx
- pptx
embed-resources: true
engine: markdown
filters:
- preview-colour
# Deprecated configuration (will show warning):
# preview-colour:
# code: true
# text: true
# New recommended configuration:
extensions:
preview-colour:
code: true
text: true
glyph:
default: "●"
html: "◉"
latex: '\\textbullet'
typst: "◉"
docx: "●"
pptx: "●"
---
## Supported Colour Formats
### ✅ Named Colours
- ✅ **code**: `red`
- ✅ **code**: `rebeccapurple`
- ✅ **code**: `cornflowerblue`
- ✅ **text**: red
- ✅ **text**: rebeccapurple
- ✅ **text**: cornflowerblue
- ✅ **British/American**: `gray` / `grey`
### ✅ Hex Codes
- ✅ **code**: `#441100`
- ✅ **text**: #441100
### ✅ short hex codes
- ✅ **code**: `#F03`
- ✅ **text**: #F03
### ✅ RGB
- ✅ **code**: `rgb(10, 100, 200)`
- ✅ **code** (no space): `rgb(10,100,200)`
- ✅ **text**: rgb(10, 100, 200)
- ✅ **text** (no space): rgb(10,100,200)
### ✅ RGB (%)
- ✅ **code**: `rgb(100%, 20%, 100%)`
- ✅ **code** (no space): `rgb(100%,20%,100%)`
- ✅ **text**: rgb(100%, 20%, 100%)
- ✅ **text** (no space): rgb(100%,20%,100%)
### ✅ HWB
- ✅ **code**: `hwb(135 0% 40%)`
- ✅ **text**: hwb(135 0% 40%)
### ✅ HSL
- ✅ **code**: `hsl(240, 100%, 50%)`
- ✅ **code** (no space): `hsl(240,100%,50%)`
- ✅ **text**: hsl(240, 100%, 50%)
- ✅ **text** (no space): hsl(240,100%,50%)
## Multiple and Embedded Colours
### ✅ Multiple Colours (Inline)
- ✅ **code**: `["#FF0000", "#00FF00", "#0000FF"]`
- ✅ **code**: `#FF0000 #00FF00 #0000FF`
- ✅ **code**: `colors: ["#E74C3C", "#3498DB", "#2ECC71", "#F39C12"]`
### ✅ Embedded Colours (in Code)
- ✅ **code**: `my_scale <- list(scale_colour_manual(values = c("Adelie" = "#0A64C8")))`{.r}
- ✅ **code**: `color1 = "#FF5733"; color2 = "#33FF57"`{.python}
- ✅ **code**: `background-color: #282c34;`{.css}
### ✅ Mixed Formats
- ✅ **code**: `["#FF0000", "rgb(0, 255, 0)"]`