Tag Info

New answers tagged

3

You can combine colors like in the following example. unitsize(3inch); for (real fred = 0.0; fred <= 1.0; fred += 0.1) { for (real fblue = 0.0; fblue <= 1.0; fblue += 0.1) { fill(shift(fred,fblue)*scale(0.1)*unitsquare, fred*red+fblue*blue); } }


3

Use the binary operator * to scale the colors/pens, and the binary operator + to add colors/pens together. Therefore, replacing RoyalBlue with RoyalBlue*0.25 + white*0.75 (25 % RoyalBlue mixed with 75 % white) should yield the output you want. size(700); import solids; import texcolors; import three; currentprojection=orthographic ( camera=(8,4,4), ...


3

Disclaimer: I am not a colourosopher and this is the first time I have ever touched colorimetry. Be warned. An elegant approach to your problem is functional shading. It allows for a very general solution, easily adjustable to other analogous problems (read: other colour spaces). On close inspection your dataset seems botched, so I'm just going to ignore ...


1

You can set various colours using the \hypersetup command (or as optional arguments in \usepackage[...]{hyperref}). In light of the comments I have expanded the MWE: \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{hyperref} \hypersetup{ colorlinks = true, linkcolor =LightSkyBlue, anchorcolor = red, citecolor = blue, urlcolor = ...


1

This: resolves conflicting preamble calls in favour of pdfTeX and kpfonts; makes all chapter entries in the ToC blue, including the chapter number and title but not the number line or page; makes all section entries in the ToC and all section headings magenta, including the section number and title; tidies up a bit e.g. by eliminating unnecessary ...


2

Define your colour shade of black first and then add that to the font specification using the Color (or Colour) key-value: \documentclass{article} \usepackage{fontspec,lipsum,xcolor} \begin{document} \fontspec[Scale=0.9]{Trebuchet MS} \lipsum[1] \definecolor{myblack}{rgb}{.7,.7,.7}% 30% black \addfontfeature{Color=myblack}% \lipsum[1] \end{document} ...


0

Here are two solutions. Note with booktabs there is a white strip at the top and the bottom of coloured cells. If you don't want it, you can replace booktabs with boldline + cellspace to achieve a similar effect: \documentclass[]{book} \usepackage{tabularx} % LINE-A \usepackage[table, x11names]{xcolor} \usepackage{booktabs} \usepackage{colortbl} ...


2

If you want to color only the lines you can load package ulem and define new commands for colored lines as suggested in its manual: \newcommand\sectionuline{% \bgroup\markoverwith{\textcolor{red}{\rule[-0.5ex]{2pt}{0.4pt}}}% \ULon% } \newcommand\subsectionuline{% \bgroup\markoverwith{\textcolor{blue}{\rule[-0.5ex]{2pt}{0.4pt}}}% \ULon% } Then you ...


2

Add legend style={fill=black,draw=white} to the axis options. \documentclass{beamer} \usepackage{pgfplots} \setbeamercolor{background canvas}{bg=black} \setbeamercolor{normal text}{fg=white} \begin{document} \begin{frame} \begin{tikzpicture} \begin{axis}[ legend entries={$test$}, legend style={fill=black,draw=white}, xlabel={xlabel}, ylabel={ylabel}, ...


1

Something like this? This is not the 'right' way to do it but it involves minimal disruption to existing code. In particular, the frame content need not be altered. \documentclass{beamer} \newcommand\MyBoxInactive[1]{% \begin{minipage}[b][.20\textheight][t]{.20\textwidth}% \setbeamercolor{normal text}{fg=gray}\usebeamercolor[fg]{normal text}% ...


0

How about using TikZ to define your boxes? Something along these lines: \documentclass[t]{beamer} \setbeamersize{text margin left=0.5em, text margin right=0.5em} \setbeamertemplate{frametitle}{\color{black}\bfseries\insertframetitle\par\vskip-6pt\hrulefill} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ invisible/.style={opacity=0.3}, ...


5

Here an alternative to get to the desired image. I did just an approximation (no mathematical correct drawing) on the path on the globe. See this as a simple how to. \documentclass[tikz, border=6mm]{standalone} \usetikzlibrary{backgrounds} \begin{document} \begin{tikzpicture}[x={(215:.75cm)},y={(-10:1cm)},z={(90:1cm)}] % Axes ...


1

Two options. Since minipage lets you control its height, instead of columns I'd rather use two side-by-side minipages, enclosing one of them in a \colorbox: The code: \documentclass[t]{beamer} \setbeamersize{text margin left=1em, text margin right=1em} \begin{document} \begin{frame} \frametitle{Test} ...


2

(Too long for a comment, hence posted as an answer.) I experience no problem getting both the bib entry and the associated number to show up in blue if either the color or the xcolor package is loaded. \documentclass{article} \usepackage{xcolor} % or "color" \begin{document} \begin{thebibliography}{99} \bibitem{ref1} faljadls;fjasl;fj {\color{blue} ...


2

The following MWE gives red, 5pt line on page one and two: \documentclass{scrlttr2} \usepackage{scrlayer-scrpage,xcolor} \KOMAoption{headsepline=true, headsepline=5pt:, fromrule=aftername} \addtokomafont{headsepline}{\color{red}} \addtokomafont{fromrule}{\color{red}} \makeatletter \@setplength{fromrulethickness}{5pt} \makeatother ...


2

Warsaw uses the shadow outer theme which applies a shading after the frame title: \pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{% color(0pt)=(bg); color(4pt)=(black!50)} One way to hide the shading is to redefine it so it matches your canvas background color: \pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{% ...


2

The usual way for this is to use lrbox; the only quirk is to carry the third argument to the “end part”, which is easy with \colorlet. The problem is that you can't open \colorbox{<color>}{ in the “begin part” and close it in the “end part”. So, with lrbox we store the tabular in a storage bin and use it later as argument to \colorbox. ...


3

Use the environ package instead to capture the body of the environment so as to avoid problems with the \colorbox opening in the begin part and closing in the end part of a standard \newenvironment: \documentclass{article} \usepackage[table]{xcolor} \usepackage{environ} \definecolor{tabularbg}{gray}{0.8} \definecolor{tabuline}{named}{white} % whiten the ...


0

I had a similar problem and it turns out I forgot to include \usepackage{xcolor} So despite the package being installed it was not included, thus yielding the error message.


8

\documentclass{article} \usepackage{xcolor} \begin{document} \color{green} % set color \colorlet{oldcolor}{.} % save current colour, internally named as . \color{red} % set colour to new colour Some text \color{oldcolor} % restore old colour Some text \end{document}


5

what is happening when -b is put inside braces is that the minus is being interpreted as a unary rather than a binary minus, since it has nothing (as detectable by tex) on its left side. to remedy that, it's sufficient to insert an empty group, {}, to its left: \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} ...


6

For this kind of things you need \begingroup .. \endgroup. If you use {..} LaTeX treats it as a \mathord{..}. So this should do \begingroup\color{ocre}-b\endgroup May be you prefer a macro; I don't know if this has any big disadvantages, though. \newcommand\mathcolor[2]{\begingroup\color{#1}#2\endgroup} .. a \mathcolor{ocre}{- b}


6

You can specify text color via the style used for the nodes as follows: \tikzset{/tikz/notestyleraw/.append style={text=blue!20!white}} \documentclass{article} \usepackage{blindtext} \usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes} \presetkeys% {todonotes}% {inline,backgroundcolor=yellow}{} \tikzset{/tikz/notestyleraw/.append ...


4

Since there is not an option to do that, the simplest way is to redefine the \todo command. So, add the following lines to your preamble. \makeatletter \renewcommand{\todo}[2][]{\@bsphack\@todo[#1]{\textcolor{blue!20!white}{#2}}\@esphack\ignorespaces} \makeatother MWE: \documentclass{article} \usepackage{blindtext} ...


5

Regarding the normal text font, you can change it by installing the normal text color using something like \setbeamercolor{normal text}{fg=blue} see example code below. Regarding the highlighted text, first recall that beamer already provides the \alert command which gives the functionality that you seem to be looking for. In any case, if you want to ...


4

Today I've watched this great video from SciPy 2015 and it resonated so well with me (recovering matlab user, developing python stuff, also being colorblind) I wanted to do some publicity about it. It is about a new colormap viridis that is among other things, colorblind friendly and sequentially proper and free. Here is the video link. Also here is an ...


0

I just managed to solve a color problem in kile (i'm using a dark theme on ubuntu and the text in kile side panel had no contrast) using the KDE System Settings which can be found in the Ubuntu Software Center. Go to > Application Appearence -> Colors(sidebar) -> Colors and try to change the background color. Hope it can be useful.


1

Try the following patch: \documentclass[border=2pt]{standalone} \usepackage[table]{xcolor} \usepackage{etoolbox} \newenvironment{tabularc}[1] {\patchcmd{\ialign}{\everycr{}}{}{}{}% \everycr{#1}% \tabular} {\endtabular} \newcommand\addhr{\noalign{\hrule height 0.2mm }} \begin{document} \rowcolors{1}{red!50}{blue!50} \begin{tabularc}{\addhr}{llcr} ...


0

Here is a solution, without the table environment — replaced with center. In case you still want a caption, I used the captionof command, supplied by the capt-of and the caption package. Don't forget % just before \begin{tabular} and just after \end{tabular}. \documentclass[12pt]{report} \usepackage[]{graphicx} \usepackage[table, x11names]{xcolor} ...


3

You cannot put a float such as table inside a \colorbox which is static. Go the other way around and use \colorbox inside table: \documentclass[12pt]{report} \usepackage[]{graphicx} \usepackage[]{xcolor} \usepackage{booktabs} \begin{document} \begin{table} \colorbox{yellow!20}{% \begin{tabular}{lll} \toprule ...


2

Here's one way to do it: The code: \documentclass{beamer} \setbeamercolor*{thcolor}{fg=blue!60} \makeatletter \setbeamertemplate{theorem begin} {\usebeamercolor[fg]{thcolor}% for the heading {\bfseries\inserttheoremname~}% \ifx\inserttheoremaddition\@empty\else(\inserttheoremaddition)\ \fi% \hspace{.01em}\normalfont\usebeamercolor[fg]{thcolor}% ...


1

For standard classes there's the titling package. After the edit to the question, the class used here is beamer. In this case, the answer is really simple since beamer provides an easy way to change the color attributes for the title: \documentclass{beamer} \setbeamercolor{title}{fg=red,bg=blue} \title{The Title} \begin{document} \begin{frame} ...



Top 50 recent answers are included