summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tcolorbox/tcolorbox.doc.vignette.tex
blob: ebf9f137d5073c745d52f12b392a82388feaf88f (plain)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
% !TeX root = tcolorbox.tex
% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox)
\clearpage
\section{Library \mylib{vignette}}\label{sec:vignette}%
\tcbset{external/prefix=external/vignette_}%
The library is loaded by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{vignette}
\end{dispListing}
This also loads the \mylib{skins} library, see \Fullref{sec:skins},
and the |fadings| library of |tikz| \cite{tantau:tikz_and_pgf}.


\subsection{Vignette Drawing}\label{subsec:vignettedrawing}

\begin{docCommand}[doc new=2016-04-22]{tcbvignette}{\marg{options}}
  In this context, a \emph{vignette} is a four part rectangular frame.
  It is constructed as several \tikzname\ paths and, therefore, can only be
  used inside a |tikzpicture| environment or inside \refEnv{tcolorbox} options.

  The \meta{options} control position, size and style settings of the vignette.
  Theses options have the common key path |/tcb/vig/| and are described in
  the following.

  The next examples show direct \refCom{tcbvignette} usage without
  a \refEnv{tcolorbox}.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{}
\end{tikzpicture}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \node[draw,fill=blue!15!white] (A) {Test};
  \tcbvignette{outside node=A,raised color=blue}
\end{tikzpicture}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \node[draw,fill=blue!15!white] (A) {Another Test};
  \tcbvignette{size=3mm,outside node=A,
    north style=red,east style=yellow,
    south style=blue,west style=green}
\end{tikzpicture}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \node[inner sep=3mm,fill=red!75] (A) {Test};
  \tcbvignette{over node=A,fade in}
\end{tikzpicture}
\end{dispExample*}

\refCom{tcbvignette} can be used directly inside appropriate options keys
for \refEnv{tcolorbox}. Note that options like \refKey{/tcb/underlay} need
\refKey{/tcb/enhanced} or similar settings.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,sharp corners,
  colback=green!10,colframe=green!50!black,
  boxrule=1mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  underlay={\tcbvignette{size=1mm,inside node=frame,
      raised color=green!50!black}}]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

Mostly, convenient short cuts like \refKey{/tcb/underlay vignette} can
be used to add a \emph{vignette} to a \refEnv{tcolorbox}. Here, \refCom{tcbvignette}
is used internally.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,sharp corners,
  colback=green!10,colframe=green!50!black,
  boxrule=1mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  underlay vignette]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\end{docCommand}



\subsection{Generic Geometry Settings}\label{subsec:vignettegeometry}


\begin{vigTcbKey}[][doc new=2016-04-22]{xmin}{=\meta{length}}{no default, initially |0pt|}
  Sets the lower horizontal limit of a \refCom{tcbvignette}.
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{xmax}{=\meta{length}}{no default, initially |1cm|}
  Sets the upper horizontal limit of a \refCom{tcbvignette}.
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{ymin}{=\meta{length}}{no default, initially |0pt|}
  Sets the lower vertical limit of a \refCom{tcbvignette}.
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{ymax}{=\meta{length}}{no default, initially |1cm|}
  Sets the upper vertical limit of a \refCom{tcbvignette}.
\end{vigTcbKey}


\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (0,0) rectangle (3,2);
  \path [pattern=checkerboard,pattern color=black!30]
    (0,0) rectangle (3,2);
  \tcbvignette{xmin=1cm,xmax=2.5cm,ymin=0.5cm,ymax=1.75cm}
\end{tikzpicture}
\end{dispExample*}


\begin{vigTcbKey}[][doc new=2016-04-22]{lower left corner}{=\meta{coordinates}}{style, initially |0,0|}
  Sets the lower left corner of a \refCom{tcbvignette}.
  This style sets \refKey{/tcb/vig/xmin} and \refKey{/tcb/vig/ymin}.
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{upper right corner}{=\meta{coordinates}}{style, initially |1,1|}
  Sets the upper right corner of a \refCom{tcbvignette}.
  This style sets \refKey{/tcb/vig/xmax} and \refKey{/tcb/vig/ymax}.
\end{vigTcbKey}


\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (0,0) rectangle (3,2);
  \path [pattern=checkerboard,pattern color=black!30]
    (0,0) rectangle (3,2);
  \tcbvignette{lower left corner={1,0.5},
               upper right corner={2.5,1.75}}
\end{tikzpicture}
\end{dispExample*}

\enlargethispage*{1cm}

\begin{vigTcbKey}[][doc new=2016-04-22]{inside node}{=\meta{name}}{style, initally unset}
  Places the \refCom{tcbvignette} inside the node with the given \meta{name}.
  The outer limits of the \emph{vignette} are adapted to the node geometry.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \node[minimum width=2cm,minimum height=1cm] (A) {Node A};
  \tcbvignette{inside node=A}
  \draw[very thick] (A.south west) rectangle (A.north east);
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\clearpage

\begin{vigTcbKey}[][doc new=2016-04-22]{outside node}{=\meta{name}}{style, initally unset}
  Places the \refCom{tcbvignette} outside the node with the given \meta{name}.
  The inner limits of the \emph{vignette} are adapted to the node geometry.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \node[minimum width=2cm,minimum height=1cm] (A) {Node A};
  \tcbvignette{outside node=A}
  \draw[very thick] (A.south west) rectangle (A.north east);
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{over node}{=\meta{name}}{style, initally unset}
  Places the \refCom{tcbvignette} over the node with the given \meta{name}.
  The outer limits of the \emph{vignette} are adapted to the node geometry, but
  are shifted to the outside by \refKey{/tcb/vig/over node offset}.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \node[minimum width=2cm,minimum height=1cm] (A) {Node A};
  \tcbvignette{over node offset=1mm,over node=A}
  \draw[very thick] (A.south west) rectangle (A.north east);
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{over node offset}{=\meta{length}}{no default, initially |0.1mm|}
  Determines the shift value for \refKey{/tcb/vig/over node}.
  Note that \refKey{/tcb/vig/over node offset} has to be set \emph{before}
  \refKey{/tcb/vig/over node} is used.
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{north size}{=\meta{length}}{no default, initially |2mm|}
  Sets the thickness of the north \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{north size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{south size}{=\meta{length}}{no default, initially |2mm|}
  Sets the thickness of the south \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{south size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{east size}{=\meta{length}}{no default, initially |2mm|}
  Sets the thickness of the east \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{east size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{west size}{=\meta{length}}{no default, initially |2mm|}
  Sets the thickness of the west \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{west size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\clearpage

\begin{vigTcbKey}[][doc new=2016-04-22]{vertical size}{=\meta{length}}{style, initially |2mm|}
  Sets \refKey{/tcb/vig/north size} and \refKey{/tcb/vig/south size},
  to the given \meta{length}.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{vertical size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{horizontal size}{=\meta{length}}{style, initially |2mm|}
  Sets \refKey{/tcb/vig/east size} and \refKey{/tcb/vig/west size},
  to the given \meta{length}.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{horizontal size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{size}{=\meta{length}}{style, initially |2mm|}
  Sets \refKey{/tcb/vig/north size}, \refKey{/tcb/vig/south size},
  \refKey{/tcb/vig/east size}, and \refKey{/tcb/vig/west size} to the given \meta{length}.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{size=4mm}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{marker}
\refKey{/tcb/vig/north size}, \refKey{/tcb/vig/south size}, etc. have to
be set \emph{before} \refKey{/tcb/vig/outside node} is used.
\end{marker}



\subsection{Generic Color and Style Settings}\label{subsec:vignettestyle}

\begin{vigTcbKey}[][doc new=2016-04-22]{north style}{=\marg{style}}{no default, initially |red!50!white|}
  Sets \tikzname\ \meta{style} options for the north \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{north style=blue}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\begin{vigTcbKey}[][doc new=2016-04-22]{south style}{=\marg{style}}{no default, initially |red!50!black|}
  Sets \tikzname\ \meta{style} options for the south \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{south style={draw=blue,fill=yellow}}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{east style}{=\marg{style}}{no default, initially |red!75!black|}
  Sets \tikzname\ \meta{style} options for the east \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{east style={left color=yellow!75!black,
    right color=blue!75!black}}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}

\clearpage

\begin{vigTcbKey}[][doc new=2016-04-22]{west style}{=\marg{style}}{no default, initially |red!75!white|}
  Sets \tikzname\ \meta{style} options for the west \emph{vignette} part.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{west style={preaction={fill=black!20},
    pattern=checkerboard,
    pattern color=black!30}}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-05-24]{scope}{=\marg{style}}{no default, initially empty}
  The four \emph{vignette} parts are drawn inside a \tikzname\ |scope|
  environment which takes the given \meta{style} as option.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{scope={transparency group,opacity=0.25}}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}



\begin{vigTcbKey}[][doc new=2016-04-22]{raised color}{=\meta{color}}{no default}
  Creates a raised frame impression by setting the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  to darkened and lightened variations of the given \meta{color}.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{raised color=blue}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{lowered color}{=\meta{color}}{no default}
  Creates a lowered frame impression by setting the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  to darkened and lightened variations of the given \meta{color}.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{lowered color=green!75!black}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{color from}{=\meta{inner} |to| \meta{outer}}{no default}
  Sets the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  such that the color shades from the
  \meta{inner} color to the \meta{outer} color.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{color from=red to blue!50}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}



\begin{vigTcbKey}[][doc new=2016-04-22]{base color}{=\meta{color}}{no default}
  Sets the base color for \refKey{/tcb/vig/raised color},
  \refKey{/tcb/vig/lowered color}, \refKey{/tcb/finish fading vignette}.
  Typically, this value has not to be set directly.
\end{vigTcbKey}


\clearpage
\begin{vigTcbKey}[][doc new=2016-04-22]{draw method}{=\docValue{direct}\textbar\docValue{clipped}}{no default, initially |direct|}
  Especially, if shadings or fadings are used, the drawn \emph{vignette}
  graphs are displayed sometimes not as perfect as expected. Glitches and
  imperfections are very dependent on the previewer software.
  The \refKey{/tcb/vig/draw method} intends to give a choice of alternative
  drawing methods.
  \begin{itemize}
  \item\docValue{direct}: The \emph{vignette} parts are drawn/filled
    by using a single \tikzname\ graph. This is the preferred (and default)
    method for solid color graphs.
  \item\docValue{clipped}: The \emph{vignette} parts are drawn somewhat
    oversized and are clipped to the intended region.
    In combination with shadings and fadings this seems to give a
    better/different optical result (depends on the previewer).
  \end{itemize}
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{color from=red to yellow}
\end{tikzpicture}
\end{dispExample*}
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \tcbvignette{color from=red to yellow,draw method=clipped}
\end{tikzpicture}
\end{dispExample*}

\begin{marker}
This option is a stopgap and may be changed or preferably removed in
future.
\end{marker}
\end{vigTcbKey}



\subsection{Generic Fading Settings}\label{subsec:vignettefading}

The |fadings| library of |tikz| \cite{tantau:tikz_and_pgf} is loaded
automatically by the \mylib{vignette} library.
Amongst others, the fadings
\docFading{west},
\docFading{east},
\docFading{north}, and
\docFading{south} are defined inside the |fadings| library.

The \mylib{vignette} library adds some more fadings called
\docFading{semi west},
\docFading{semi east},
\docFading{semi north}, and
\docFading{semi south}.
These fadings are much \emph{weaker} than the normal fadings.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (0,0) rectangle (1,1);
  \path [pattern=checkerboard,pattern color=black!30]
    (0,0) rectangle (1,1);
  \fill [path fading=semi west,blue] (0,0) rectangle (1,1);
\end{tikzpicture}
\end{dispExample*}



\begin{tcboxedraster}{base example,title=Comparison of the Fadings}
  \def\doShadingExample#1{%
    \begin{tcolorbox}[sbs,size=fbox,colback=white,lower separated=false,
      righthand width=2cm,left=5mm]
    \docFading{#1}\tcblower
    \begin{tikzpicture}
        \fill [black!20] (0,0) rectangle (1,1);
        \path [pattern=checkerboard,pattern color=black!30] (0,0) rectangle (1,1);
        \fill [path fading=#1,blue] (0,0) rectangle (1,1);
    \end{tikzpicture}
    \end{tcolorbox}}%
  \doShadingExample{west}
  \doShadingExample{east}
  \doShadingExample{north}
  \doShadingExample{south}
  \doShadingExample{semi west}
  \doShadingExample{semi east}
  \doShadingExample{semi north}
  \doShadingExample{semi south}
\end{tcboxedraster}


\clearpage

\begin{vigTcbKey}[][doc new=2016-04-22]{fade in}{\colOpt{=\marg{style}}}{style, default |white|}
  Sets the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  such that the paths fade from outside to inside.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5);
  \path [pattern=checkerboard,pattern color=black!30]
    (-0.5,-0.5) rectangle (1.5,1.5);
  \tcbvignette{fade in=blue}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{fade out}{\colOpt{=\marg{style}}}{style, default |white|}
  Sets the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  such that the paths fade from inside to outside.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5);
  \path [pattern=checkerboard,pattern color=black!30]
    (-0.5,-0.5) rectangle (1.5,1.5);
  \tcbvignette{fade out=blue}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{semi fade in}{\colOpt{=\marg{style}}}{style, default |white|}
  Sets the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  such that the paths fade weak from outside to inside.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5);
  \path [pattern=checkerboard,pattern color=black!30]
    (-0.5,-0.5) rectangle (1.5,1.5);
  \tcbvignette{semi fade in=blue}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}


\begin{vigTcbKey}[][doc new=2016-04-22]{semi fade out}{\colOpt{=\marg{style}}}{style, default |white|}
  Sets the four style options
  \refKey{/tcb/vig/north style},
  \refKey{/tcb/vig/south style},
  \refKey{/tcb/vig/east style}, and
  \refKey{/tcb/vig/west style}
  such that the paths fade weak from inside to outside.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tikzpicture}
  \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5);
  \path [pattern=checkerboard,pattern color=black!30]
    (-0.5,-0.5) rectangle (1.5,1.5);
  \tcbvignette{semi fade out=blue}
\end{tikzpicture}
\end{dispExample*}
\end{vigTcbKey}




\clearpage
\subsection{Vignette as Underlay}\label{subsec:vignetteunderlay}

\begin{docTcbKey}[][doc new=2016-04-22]{underlay vignette}{\colOpt{=\marg{options}}}{style, no default}
  This puts a \refCom{tcbvignette} with the given \meta{options}
  as \refKey{/tcb/underlay} to a \refEnv{tcolorbox}.
  The dimensions of the \emph{vignette} are matched to the dimensions of
  the \refEnv{tcolorbox}. For example, \refKey{/tcb/leftrule} is used as
  \refKey{/tcb/vig/west size}. Also, \refKey{/tcb/colframe} is used as
  \refKey{/tcb/vig/raised color}.

  For a \refKey{/tcb/breakable} tcolorbox, the \emph{vignette} is also
  been broken.
  Alternatively, \refCom{tcbvignette} could be used directly inside
  an \refKey{/tcb/underlay} with appropriate settings.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,sharp corners,
  colback=green!10,colframe=green!50!black,
  boxrule=2mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  underlay vignette]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,arc=0pt,
  colback=blue!10,colframe=blue,boxrule=2mm,
  underlay vignette={size=1.5mm}]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,sharp corners,
  colframe=red,interior hidden,boxrule=2mm,
  colupper=white,center upper,fontupper=\bfseries,
  underlay vignette]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,sharp corners,
  colback=red!50!yellow,frame hidden,boxrule=2mm,
  underlay vignette={color from=red!50!yellow to white,
     draw method=clipped,size=2.1mm}]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\tcbox[enhanced,sharp corners,colback=red!10,colframe=red]
  {Test}

\tcbox[enhanced,sharp corners,colback=red!10,colframe=red,
  underlay vignette]{Test}
\end{dispExample*}

\end{docTcbKey}


\clearpage
\begin{docTcbKey}[][doc new=2016-04-22]{underlay raised shading vignette}{\colOpt{=\marg{options}}}{style, no default}
  This is a special style derived from \refKey{/tcb/underlay vignette},
  where the frame color is shaded to create a soft raised frame impression.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,sharp corners,
  colback=green!10,
  colframe=green!50!black,
  size=small,boxrule=2mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  underlay raised shading vignette]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}
\end{docTcbKey}



\begin{docTcbKey}[][doc new=2016-04-22]{underlay raised fading vignette}{\colOpt{=\marg{options}}}{style, no default}
  This style gives a similar effect as \refKey{/tcb/underlay raised shading vignette},
  but a path fading is used here. Different optical impression are very
  previewer-dependent.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,sharp corners,
  colback=green!10,
  colframe=green!50!black,
  size=small,boxrule=2mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  underlay raised fading vignette]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}
\end{docTcbKey}

\begin{docTcbKey}[][doc new=2016-04-22]{underlay shade in vignette}{\colOpt{=\marg{options}}}{style, no default}
  This is a special style derived from \refKey{/tcb/underlay vignette},
  where the frame color is shaded into the interior color.
\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,sharp corners,frame hidden,
  colback=green!10,
  colframe=green!50!black,
  size=small,boxrule=2mm,titlerule=0mm,
  underlay shade in vignette]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}
\end{docTcbKey}


\clearpage
\subsection{Vignette as Finish}\label{subsec:vignettefinish}


\begin{docTcbKey}[][doc new=2016-04-22]{finish vignette}{\colOpt{=\marg{options}}}{style, no default}
  This puts a \refCom{tcbvignette} with the given \meta{options}
  as \refKey{/tcb/finish} to a \refEnv{tcolorbox}.
  The default style settings create a raised frame impression by
  drawing black and white color parts with reduced opacity.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,
  colback=green!10,colframe=green!50!black,
  boxrule=0.5mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  finish vignette={size=1mm}]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\tcbincludegraphics[blankest,width=3cm,
  finish vignette={size=3mm}]{pink_marble.png}
\end{dispExample*}
\end{docTcbKey}


\begin{docTcbKey}[][doc new=2016-04-22]{finish raised fading vignette}{\colOpt{=\marg{options}}}{style, no default}
  This puts a \refCom{tcbvignette} with the given \meta{options}
  as \refKey{/tcb/finish} to a \refEnv{tcolorbox}.
  The default style settings create a soft raised frame impression by
  drawing fading black and white color parts.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,
  colback=green!10,colframe=green!50!black,
  boxrule=0.5mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  finish raised fading vignette={size=1mm}]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\tcbincludegraphics[blankest,width=3cm,
  finish raised fading vignette={size=3mm}]{pink_marble.png}
\end{dispExample*}

\end{docTcbKey}


\clearpage
\begin{docTcbKey}[][doc new=2016-04-22]{finish fading vignette}{\colOpt{=\marg{options}}}{style, no default}
  This puts a \refCom{tcbvignette} with the given \meta{options}
  as \refKey{/tcb/finish} to a \refEnv{tcolorbox}.
  The default style settings fade the box into white from inside to outside.
  Note that \refKey{/tcb/vig/over node} is used here.
  \refKey{/tcb/vig/over node offset} can be adapted to overlap the box
  more or less. The fade color can be set using
  \refKey{/tcb/vig/base color}.

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[enhanced,size=small,
  colback=green!10,colframe=green!50!black,
  boxrule=0.5mm,titlerule=0mm,
  title=My title,center title,fonttitle=\bfseries,
  finish fading vignette={size=2mm}]
    This is a tcolorbox.
\end{tcolorbox}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\tcbincludegraphics[blankest,width=3cm,
  finish fading vignette={size=3mm}]{pink_marble.png}
\end{dispExample*}

\begin{dispExample*}{sbs,righthand width=3cm,center lower}
\begin{tcolorbox}[colback=blue!50!black,size=small,
  title=Example]
\tcbincludegraphics[blankest,
  finish fading vignette={base color=blue!50!black,size=3mm,
    over node offset=0.2mm}]{pink_marble.png}
\end{tcolorbox}
\end{dispExample*}

\end{docTcbKey}


\begin{dispExample*}{}
\begin{tcbitemize}[raster columns=3,bicolor,
  raster equal height,sharp corners,boxrule=2mm,
  colframe=red,colback=yellow!5,colbacklower=yellow!25!red!20]
\tcbitem A
\tcbitem[underlay vignette] B
\tcbitem[underlay={\tcbvignette{inside node=interior,
  lowered color=red,size=1mm}}] C
\tcbitem[underlay vignette,
  underlay={\tcbvignette{inside node=interior,
  lowered color=red,size=1mm}}] D
\tcbitem[boxrule=3mm,underlay vignette={size=2mm},
  underlay={\tcbvignette{inside node=interior,
  lowered color=red,size=1mm}}] E
\tcbitem[underlay raised shading vignette] F
\tcbitem[underlay raised shading vignette,
  underlay={\tcbvignette{inside node=interior,
  lowered color=red,size=1mm}}] G
\tcbitem[title=H1,underlay={\tcbvignette{inside node=interior,
  lowered color=red,size=1mm}},finish vignette] H2
\tcbitem[boxrule=0.25mm,colback=red!30,finish vignette] I1 \tcblower I2
\tcbitem[tile,colback=red!30,finish raised fading vignette] J1 \tcblower J2
\tcbitem[boxrule=1mm,underlay={\tcbvignette{inside node=interior,
  raised color=red,size=1mm}}] K
\tcbitem[boxrule=1mm,title=L1,underlay={\tcbvignette{inside node=title,
  lowered color=red,size=0.5mm}}] L2
\end{tcbitemize}
\end{dispExample*}