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 ...
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 ...
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:
\...
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, ...
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 ...
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}
\...
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}
\...
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}...
10
votes
Option clash for package xcolor
Another way is to paste this line
\PassOptionsToPackage{table}{xcolor}
before
\documentclass{...}
as was already referenced here!
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 ...
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{...
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 ...
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
\...
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}
...
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 ...
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=...
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 ...
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}\...
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}
% ...
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 ...
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:
\...
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 &.
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 ...
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=...
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{...
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] (...
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}
\...
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 ...
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 ...
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{...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
color × 4142tikz-pgf × 540
tables × 532
beamer × 401
pgfplots × 182
listings × 180
hyperref × 157
backgrounds × 140
math-mode × 103
boxes × 103
formatting × 101
macros × 98
sectioning × 98
graphics × 96
pdftex × 95
fonts × 87
xetex × 84
table-of-contents × 83
tcolorbox × 83
highlighting × 82
colortbl × 82
spacing × 70
pdf × 60
environments × 57
header-footer × 56