Questions tagged [shading]

The shading operation consists of letting a background picture be rendered with different gradients of colors or light/dark. The {shading} tag is related to questions in which a shade operation is required.

Filter by
Sorted by
Tagged with
32
votes
3answers
5k views

Tikz: Shading a path without any filling

How can I shade a path witout filling? In particular, I wand to draw a curved arrow that starts colored blue and ends colored green, where in between it gradually changes its color. I can't find a way ...
36
votes
2answers
5k views

Path following color gradient in TikZ

How can I get a path following color gradient in TikZ? Here a quick example of the idea. On the left the result I'm looking for and on the right an example of a non path following gradient applied on ...
50
votes
4answers
17k views

How to draw a shaded sphere?

Andrew Stacey pointed out that the Rosetta Code entry "Draw a Sphere" doesn't have a TikZ entry yet. Is there a way to draw a "properly" shaded sphere using TikZ? The ball shading would seem an ...
26
votes
3answers
7k views

TikZ: radial shading of a ring

I would like to have a radial shading of a ring, from inner color (red) at inner radius r1 > 0 to outer color (white) at outer radius r2 > r1. But with \filldraw[even odd rule,inner color=red,outer ...
32
votes
4answers
4k views

How to shade text in different colors?

I need a single character in two colors. Figuring I could use the shadings library of TikZ, I followed the manual (section 23.4.1, the TikZ example): \documentclass{article} \usepackage{tikz} \...
30
votes
1answer
7k views

How to create a ball shading and to customize 3D lighting manually?

TikZ shading=ball creates a perfect 3D ball perspective, but it has no option to change the lighting angle, the contrast, radius of light, etc (or I am not aware of). I tried to create a 3D ball by ...
17
votes
2answers
7k views

Set table background hatched and shaded using tikz

I am looking for a convenient way to set the background of tabular cells. I'd like to do two things: (1) Set the background shaded in a color (2) Set the background hatched I learned that the TikZ ...
32
votes
4answers
16k views

Tikz: shading region bounded by several curves

I know that my effort below can be improved upon considerably. In particular, there must be a way of shading the region in a single scope, as opposed to subdividing as I have done (thus necessitating ...
13
votes
3answers
7k views

Cylinder shading with PGF/TikZ

I'm trying to create a cylinder with 3D shading effects. The cylinders in the picture are standing vertically, and have a body and an end. I'd like the body to be shaded so that it varies uniformly ...
3
votes
1answer
1k views

How do I gradient shade the background of a beamer section/subsection in head/foot?

Here is a reduced example of my code. I am attempting to restyle the background of the section in head/foot and subsection in head/foot in the CambridgeUS theme to a gradient background colour. ...
24
votes
4answers
6k views

Is there a way to tune ball shading in TikZ ?

I want to create a Go stone in TikZ. "ball color" option in node style is almost OK. Here is my result: But I don't like the stones, they are "too balish". The "reflection" should be less spot-on ...
23
votes
2answers
2k views

How do I force tikz to use CMYK everywhere (also in shadings)?

I'm doing a poster with the baposter which uses tikz and at some point realized that some colors that should be identical are not. It turns out that tikz apparently resorts to RGB color space as soon ...
11
votes
2answers
1k views

Gaussian ellipsoids using tikz

I'm trying to draw illustrations of Gaussian ellipsoids using shaded ellipses. In simple terms what I'm after is a way to have a light shade throughout the outer edge of the ellipse and a darker shade ...
5
votes
3answers
445 views

How to use Tikz \shade command in order to achieve 3D like results

I have a few graphics which I believe are good enough to show what I need but I want to go further, I am wondering what kind of settings could be used in the \shade[] command to create a 3D effect. ...
28
votes
4answers
2k views

Can fuzzy borders be added to external pictures programmatically?

In my opinion, external pictures are often more pleasing to the eye on a white background when they have fuzzy rather than "sharp" borders. For instance, compare this to that Adding fuzzy borders is ...
3
votes
1answer
3k views

How can I have a horizontally shaded frametitle in beamer?

This question is similar to How can I have a horizontally shaded block title in beamer?. I want to achieve the horizontal shading effect in the frametitle and when I use \setbeamertemplate{frametitle}...
12
votes
1answer
817 views

tikz-cd: Shade faces of commutative cube

I would like to "shade" the faces of a commutative cube drawn using tikz-cd. \documentclass{article} \usepackage{tikz} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} & P \ar{dl}[swap, ...
12
votes
1answer
2k views

How to shade mindmap concepts?

I tried to add a shade on my mindmap's concepts with \begin{tikzpicture}[mindmap, text=white, every concept/.append style={circle,shading=ball, ball color=black!20!white!20}] but the problem is ...
11
votes
2answers
1k views

How can I draw a curved gradient/fade in tikz?

I would like to draw something like the following diagram: My problem is drawing the grey curved path that fades away. The direction of the fading continually changes so that it is always ...
6
votes
1answer
656 views

Drawing a box with shading in pgfplots

As a follow-up to this question, or more precisely this answer, I'd like to know how to do the equivalent of \shadedraw [shading=axis,left color=green,right color=orange,color=blue,line width=2] ...
8
votes
1answer
2k views

Fading a path in TikZ

I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like \draw[color=black!\x] plot coordinates{ coord1 ... coord100}; i.e. the shade of the ...
11
votes
2answers
1k views

How to create a color wheel shading with other colors?

In the pgf manual one can get a circle with a jet-colormap color-wheel-shading with: \tikz \shade[shading=color wheel] (0,0) circle (1.5); How can I get the same but with another colormap? This '...
18
votes
2answers
1k views

How to make a longitudinal sine wave shading with pgfplots?

At the moment I use TikZ shadings to show up longitudinal waves in my document like this: The shading is white where the sine is –1 and blue where the sine equals 1. This looks ok, but unfortunately ...
10
votes
1answer
855 views

Shading over a single page

I want to generate shading color in background for a single page. How can I implement this?
4
votes
1answer
609 views

Five percent circle with fuzzy edge using tikz

Consider the following code: % DOCUMENT TYPE \documentclass[12pt,a4paper]{article} % PACKAGES \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{lipsum} \...
3
votes
1answer
1k views

How to get horizontal black line when coloring cells?

I have the following table with an arrow showing the missing black horizontal black line: Here is the relevant code, I am wondering how do I get a black horizontal line where there is one missing? \...
11
votes
4answers
4k views

How can I draw these polygons with shaded regions?

I don't know how to draw this by LaTeX.
6
votes
1answer
382 views

How to mimic shading currently done in TikZ in RGB, using pgfplots so it can use CMYK?

In an earlier question I learned how to make a diagonal shading on a left-hand page which was reflected on the right-hand page. This has been working fine thanks to Ignasi and others. But for the ...
11
votes
2answers
3k views

How to add a shadow to a tikz line?

I have the following tikz picture. \documentclass{standalone} \usepackage{tikz} \usepackage{xcolor} \begin{document} \begin{tikzpicture}[ arr/.style={->, blue, very thick}, lbl/.style={...
6
votes
1answer
433 views

Shaded multicols II

In extending a previous question, Shaded multicols, how can I put rounded corners on the multicol environment, for the outer 4 corners (ie the corners directly next to the page margins) This question ...
15
votes
2answers
2k views

TikZ: shade also the border of a node

I would like to shade a node and the border of the node. The following code works but I don't like it very much that I have to draw something after the node on the background layer. I would prefer a ...
12
votes
3answers
25k views

How to change the background color of \framebox?

I'm trying to change a picture drawn using the plain picture environment and I need to change the background color of certain \framebox to lightgrey. Is it possible? I know that there are more ...
6
votes
1answer
2k views

More on “Cylinder shading with pgf TiKZ”

In his answer to Cylinder shading with PGF/TikZ, Jake provides a code to draw a shaded cylinder with a not shaded top. This code draws a cylinder node (from shapes.geometric library) and after that, ...
15
votes
1answer
3k views

TikZ, 3d library and circle fading

I'm using the 3d library to put a circle on the z=0 plane, and other things. I'd like to fade this circle radially, but the result isn't as I would expect because the fading is not proportional to the ...
8
votes
1answer
967 views

How can I have a horizontally shaded block title in beamer?

\documentclass{beamer} \usetheme{Rochester} \setbeamertemplate{block title}[horizontal shading][left=black, right=white] \begin{document} \begin{frame} \frametitle{MWE} \begin{block}{Title} ...
0
votes
1answer
109 views

Create a TikZ overlay with RH mirror of LH

Thanks to John Kormylo in this question ("Clip an A3 tikz overlay to two A4 pages"), I managed to create a background in two halves for use on two consecutive pages. Now I need to create symmetrical ...
13
votes
2answers
440 views

TikZ/PGF - switching off shading

Is there a way to switch off shading for one node, in a scope where the nodes are shaded? In other words, I want something like shading=none, but did not find it. Motivation: \documentclass{article} \...
12
votes
2answers
1k views

3D font in LaTeX

This is an unusual question regarding rendering of a font with a specific 3D-esque style in LaTeX, XeLaTex, or any other TeX flavor. I was looking at some fonts the other day and I came across one of ...
6
votes
1answer
1k views

Creating a line separated gradient bar in Tikz

I am trying to create something similar to this in Tikz: I have been looking at using the \shadedraw macro, but have not found a way to create the color spectrum. It seems possible if I stack ...
1
vote
2answers
478 views

How is a PGF shading applied?

Consider the following LaTeX manuscript featuring a TikZ picture of a tall, rainbow shaded rectangle. The code is essentially copy-and-pasted from the example in the end of subsection 109.3 ('Using ...
12
votes
1answer
563 views

Generate coloured fancy Delaunay patterns in Tikz

Recently in the world of the Internet this very fancy coloured pattern appeared: I was thinking if it is possible to generate something similar with TikZ. I saw this first example here in Drawing ...
11
votes
3answers
10k views

Shading areas in TikZ

It's an easy TikZ question for people who use it. I tried reading the TikZ manual p. 112 several times but it seems too complicated on the filling part, all the infinity and whatnot... So I currently ...
11
votes
1answer
431 views

How to do logarithmic shading with TikZ?

Using TikZ, the shade option is very convenient to produce color shadings, but it produces only linear color gradients. Is it possible to obtain other transitions, and especially a logarithmic one? ...
10
votes
4answers
5k views

How do I shade an area in pgfplots?

How do I create a shaded area in a polygon created by plot intersections? In this case, up to the solid line without circle marks. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=...
8
votes
1answer
993 views

(Kind of) photorealistic radial shading in TikZ

Is there a way to define more than one "spot" of light for one shading? Two (default white highlight and a big pink reflected light spot) were good and three were just great. I'm using \shadedraw[...
8
votes
1answer
2k views

Is it possible to define the position of top bottom and middle color in fill?

In the following example: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,calc,shapes,shapes.geometric,patterns} \begin{document} \begin{tikzpicture} \shade[...
13
votes
3answers
2k views

Shading an area bounded by curved paths between nodes

I am drawing a graph of sorts in TikZ, and I have several connected nodes in a cycle, and I would like to shade the area bounded by paths between those nodes. My problem is that the shading is not ...
9
votes
1answer
207 views

How to accomplish tangential shading (i.e. not radial shading)?

I want to produce an open ring with a color gradient that goes from white (or faint red) to red and then back to white (or faint red) in the angular/tangential direction. In the image attached below, ...
7
votes
1answer
2k views

How to use i.e. left, middle and right color when using draw as an argument instead of a command?

I'm forced to define colors within my tikzset for one of my projects. This requires me to use the draw command within my tikzset to set a color. Normally I can just use, say \draw command to just ...
5
votes
4answers
761 views

How to make shaded pages and still see memoir's trim frame?

I am using memoir and I have the showtrims setting activated which I want visible on my pages. I am trying to toggle shading of entire pages and so far I am not having any great success. I have looked ...