8

I'm using xcolor.sty's nifty wheel function to define a color scheme based on a single base color. So, for example:

\definecolor{base}{HTML}{AADD96}
\colorlet{complement}{base>wheel,1,3}

makes base a pale green color, and complement a similarly pale blue (1/4 of the way round the color wheel).

Is there a way to similarly define colors by changing the saturation or brightness of an existing color?

1 Answer 1

4

You could use \definecolorseries:

\definecolor{base}{HTML}{AADD96}
\definecolorseries{moresaturated}{hsb}{step}{base}{0,0.2,0}
\resetcolorseries{moresaturated}

will let you use moresaturated!![1] for a somewhat more saturated colour, moresaturated!![2] for an even more saturated one, and so on. (But beware overflow: once the saturation reaches 1, it's reset to zero. Here moresaturated!![4] is less saturated than base.)

Obviously you can use the same trick to go down in saturation, or up or down in brightness.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .