Hot answers tagged

21 votes
Accepted

Wordle-like colored letter boxes in latex

Here is a possibility using tikz with the matrix library. I defined three colors: great, good and bad, which you can adjust to your liking. The wordle is a TikZ matrix with the nodes filled with bad ...
Sandy G's user avatar
  • 35.8k
18 votes
Accepted

xcolor: How to get the complementary color

Defining "complementary color" is not so easy ;-) (it depends on the model, you should have a look at section 6.3 of the xcolor manual), but in a pinch, you can use the syntax -color as seen ...
Rmano's user avatar
  • 36.5k
14 votes

Wordle-like colored letter boxes in latex

Welcome to tex.stackexchange! I just finished a project using Tikz's chains library. So, like the man with a hammer that views the world as a nail, I suggest using the chains library for this: \...
sgmoye's user avatar
  • 8,150
14 votes
Accepted

Giving a Title a Gilded Effect

A TikZ version of some non described gilded effect. Compile twice with pdfLaTeX or XeLaTex. \documentclass[a5paper]{book} \usepackage[hmargin=0.7in, vmargin=0.75in]{geometry} \usepackage{pgfornament, ...
hpekristiansen's user avatar
13 votes
Accepted

Spacing before and after \color{}

Are you sure that you really want to use color? This macro is a toggle, which is maybe not the best option here. Simply use \textcolor{red}{some text} in text mode, and \mathcolor{red}{some math} in ...
Miyase's user avatar
  • 2,390
12 votes

Wordle-like colored letter boxes in latex

Quite similar to the other answer, but your question reminded me of a twitt of mine: https://twitter.com/CarLaTeXSE/status/1484979275598123015 \documentclass{standalone} \usepackage{xcolor} \...
CarLaTeX's user avatar
  • 60.5k
12 votes
Accepted

Enhancing the Radiance of a Tikz Sun

Someone will probably come up with a better answer as I think this doesn't really work with variable sized suns. But the effect is not too bad: \documentclass{article} \usepackage{tikz} \...
David Purton's user avatar
  • 25.4k
11 votes

Consistent color scheme

After some painful trial and error, I was able to figure out a solution myself: \documentclass[a4paper]{article} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \usetikzlibrary{datavisualization}...
Thargon's user avatar
  • 331
10 votes

Option clash for package xcolor

Another way is to paste this line \PassOptionsToPackage{table}{xcolor} before \documentclass{...} as was already referenced here!
EnthusiastiC's user avatar
10 votes

Wordle-like colored letter boxes in latex

Two modes: mode = manual: the type (correct/wrong/almost/no eval/no letter) must be specified directly before the letter. mode = pre: the types must be speciefied beforehand (with key pre) and then ...
Qrrbrbirlbel's user avatar
9 votes
Accepted

Making an Image into a Lettrine

Note: You need \usepackage[T1]{fontenc} to make possible for \textsc combine with \textbf. As @Cicada's comment, instead you could use some font package if you using pdflatex such as \usepackage{...
Tom's user avatar
  • 4,858
9 votes
Accepted

How to Lighten or Shade an Includegraphics Image

I think using the decodearray option to \includegraphics can suit your purposes. Based on this answer. For RGB images, decodearray takes 3 pairs of numbers between 0 and 1. The three pairs adjust the ...
David Purton's user avatar
  • 25.4k
9 votes
Accepted

l3color's colors: unusable with tikz?

Colors defined with \color_set:nnn are not usable with xcolor. Minimal example \documentclass{article} \usepackage{xcolor} \ExplSyntaxOn \color_set:nnn { myred } { rgb } { 1,0,0 } \ExplSyntaxOff \...
egreg's user avatar
  • 1.1m
9 votes

Call alternating row colors from within the table?

Like this (change colors and alignment as You like)? Code: \documentclass{article} \usepackage[table]{xcolor} \begin{document} \begin{center} \rowcolors{2}{gray!50}{white} ...
Raffaele Santoro's user avatar
8 votes

Wordle-like colored letter boxes in latex

Here's a solution inspired by @Qrrbrbirlbel's reply to my comment on his post. It defines an environment, wordle, that takes one parameter, which is the correct answer to the wordle puzzle. The ...
3141592653589793238's user avatar
8 votes
Accepted

Symmetric blend modes

You could use blend mode=screen: \documentclass[tikz,border=1.618]{standalone} \begin{document} \begin{tikzpicture}[blend mode=screen] \fill[red ,opacity=0.5] (1,0) rectangle (2,2); \fill[blue,opacity=...
Juan Castaño's user avatar
7 votes
Accepted

Is there a (better) way to repeatedly toggle between two font colors within a paracol environment, and compiling with XeTeX?

This bug is happening because that many color changes in the same environment is exceeding the capacity of the XeTeX color stack. Your bug is a literal stack overflow. One way to solve it in XeTeX is ...
Davislor's user avatar
  • 42.2k
7 votes
Accepted

Change color for each item in itemize

You can redefine \item to accept an optional argument for the color using xcolor. \documentclass[11pt]{article} \usepackage{xcolor} \let\olditem\item\renewcommand{\item}[1][black]{\color{#1}\...
Sandy G's user avatar
  • 35.8k
7 votes
Accepted

Display colors and their names

You can use collcell. I made other adjustments to the table. \documentclass{article} \usepackage[table,dvipsnames,x11names]{xcolor} % colors with names \usepackage{booktabs} \usepackage{collcell} % ...
egreg's user avatar
  • 1.1m
7 votes

Why 'yellow' isn't good for optional parameter of \fill, when it is the results of an \ifthenelse command?

The optional argment to the path is handed to PGFKeys which needs fully exandable key names. (No, each color is not its own key, PGFKeys does a lot of work in the /tikz namespace to sort out colors ...
Qrrbrbirlbel's user avatar
6 votes
Accepted

How to color the table in latex?

There's the colortbl package, but with \clines, I recommend either the NiceTabular environment from the nicematrix package, or using the similar facilities of the tabularray package. With nicematrix: \...
frabjous's user avatar
  • 40.7k
6 votes
Accepted

Compilation error when using &

This is a bug, fixed for the next release see https://github.com/latex3/latex2e/issues/901 There is a full patch there or simply guard the & with a \relax before the &.
David Carlisle's user avatar
6 votes
Accepted

How to use xcolor color names in tikzpicture style?

The package tikz (by way of package pgfcore) loads the xcolor package. In your case, the standalone class with the option tikz also loads the tikz package (and configurates other settings so that it ...
Qrrbrbirlbel's user avatar
6 votes
Accepted

How to make a striped, colored circle in Tikz?

\documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{patterns.meta} \begin{document} \begin{tikzpicture} \fill[orange!50!yellow, postaction={pattern={Lines[angle=-45, distance=2mm, line width=...
hpekristiansen's user avatar
6 votes

Calculators packages : TI and Casio

Just swap the order so the package using xcolor options is first \documentclass[a4paper,12pt]{report} \usepackage{tipfr} % TIcalculator \usepackage[color=real]{graph35} % Casio calculator \begin{...
David Carlisle's user avatar
6 votes

Draw the x-y-plane with the four quadrants marked in four different colors

Something to get started. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} %\draw[help lines, color=gray!30] (-4.9,-4.9) grid ; \draw[->,thick] (...
Zxcvasdf's user avatar
  • 1,595
6 votes

Draw the x-y-plane with the four quadrants marked in four different colors

Another one, adding all the quadrants in a \foreach loop: \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \foreach[count=\ii from 0]\i in {blue,red,green,yellow} \...
Juan Castaño's user avatar
6 votes
Accepted

What is the difference between "none" and "white" on package pagecolor?

Description pagecolor=none is the default, and it means, there is no background (can be thought of as transparent background) pagecolor=white explicitly sets the background color to white You can ...
dexteritas's user avatar
  • 7,716
6 votes

Replicating MS Word Table Style

You must be aware of the order of priority of clortbl package, so using \rowcolors the column color has no effect, but \cellcolor overrides to any other. On the other hand: Never ever place a float ...
Fran's user avatar
  • 77.3k
5 votes
Accepted

Log the RGB components of a color defined using xcolor syntax

If you set \tracingcolors=4, the log will contain the desired information: Package xcolor Info: Setting color `{}{0.3 0 0 rg 0.3 0 0 RG}{rgb}{0.3,0,0}' on input line 7. Obtained from: \documentclass{...
frougon's user avatar
  • 23.9k

Only top scored, non community-wiki answers of a minimum length are eligible