[texhax] Package BeamerColor

Jim Diamond Jim.Diamond at acadiau.ca
Wed Sep 1 16:17:35 CEST 2010

On Wed, Sep  1, 2010 at 15:09 (+0100), Philip Taylor (Webmaster, Ret'd) wrote:

> Herbert Voss wrote:


>>it is a private package and not available on CTAN.

> I don't normally prefer compactness over readability,
> but I think that, faced with 450-odd lines of

> 	\definecolor{AliceBlue}{rgb}{0.94,0.97,1}
> 	\definecolor{BlueViolet}{rgb}{0.54,0.17,0.88}
> 	\definecolor{CadetBlue}{rgb}{0.37,0.62,0.63}

> I might have done something similar to

> 	\def \DCRGB #1#{\definecolor {#1}{rgb}}

> and then 450-odd lines of

> 	\DCRGB {AliceBlue}{0.94,0.97,1.00}
> 	\DCRGB {BlueViolet}{0.54,0.17,0.88}
> 	\DCRGB {CadetBlue}{0.37,0.62,0.63}

If you like readability, how about

\def\DCRGB #1 #2 #3 #4 {\definecolor {#1}{rgb}{#2,#3,#4}}

	\DCRGB AliceBlue 0.94 0.97 1.00
	\DCRGB BlueViolet 0.54 0.17 0.88

Add extra spaces as desired.

I've never really understood the average LaTeX user's fixation with
unnecessary braces.


P.S. Yes, I'm (mostly) sure a creative user can come up with some way
to break that definition, but if they desperately want to do so, why
spoil their fun?

More information about the texhax mailing list