COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### colortbl \rowcolor FOREGROUND color?

• Email
• Follow

I asked this in 2007, but no answer.  I presume this is not possible,
but I will ask briefly---has it become possible to change the
foreground text color with a \rowcolor-like command, too, or is it
still only possible to change the background color (with colortbl's
\rowcolor)?


 0

See related articles to this posting

Am 03.02.2011 04:15, schrieb iaw4:
>
> I asked this in 2007, but no answer.  I presume this is not possible,
> but I will ask briefly---has it become possible to change the
> foreground text color with a \rowcolor-like command, too, or is it
> still only possible to change the background color (with colortbl's
> \rowcolor)?

\documentclass[a4paper]{article}
\usepackage[table]{xcolor}
\usepackage{array}
\begin{document}

\begin{tabular}{>{\columncolor{blue!40}\color{yellow}}c>{\color{red}}c}
foo & bar \\
\rowcolor{cyan!30} foo & bar
\end{tabular}

\end{document}

Herbert

 0

Le 03/02/2011 09:09, Herbert Voss a �crit :
> Am 03.02.2011 04:15, schrieb iaw4:
>>
>> I asked this in 2007, but no answer.  I presume this is not possible,
>> but I will ask briefly---has it become possible to change the
>> foreground text color with a \rowcolor-like command, too, or is it
>> still only possible to change the background color (with colortbl's
>> \rowcolor)?
>
>
>
>
> \documentclass[a4paper]{article}
> \usepackage[table]{xcolor}
> \usepackage{array}
> \begin{document}
>
> \begin{tabular}{>{\columncolor{blue!40}\color{yellow}}c>{\color{red}}c}
>   foo&  bar \\
> \rowcolor{cyan!30} foo&  bar
> \end{tabular}
>
> \end{document}
>
> Herbert

If your columns are not l, c or r (ie p, m or b) then make sure \color
is preceded by \leavevmode, \noindent, \indent or \quitvmode (pdfTeX)...


 0

thanks, herbert.  no, I mean a foreground color for a whole row, not a
foreground color for a column...

/iaw

 0

Am 03.02.2011 19:21, schrieb iaw4:
>
> I mean a foreground color for a whole row, not a
> foreground color for a column...

\documentclass[a4paper]{article}
\usepackage[table]{xcolor}
\usepackage{array}

\newcolumntype{C}{>{\color{\fgcolor}}c}
\newcommand*\setfgcolor[1]{\gdef\fgcolor{#1}}
\setfgcolor{black}

\begin{document}

\begin{tabular}{>{\columncolor{blue!40}}CCC}
foo & bar & baz\setfgcolor{red}\\
foo & bar & baz\setfgcolor{black}\\
foo & bar & baz\\
\end{tabular}

\end{document}

must be set _before_ the foregoing row ends

Herbert

 0

thank you, herbert.  duh!  great use of the '>' command with gdef.

 0

5 Replies
229 Views

Similar Articles

12/8/2013 10:34:14 PM
[PageSpeed]

Similar Artilces:

Monitor color, PS color, Web color
I need a reality check. If I have a web page and set the background to, say, #009933 (allegedly a web-safe color) and then specify in CS the same color, then is it true that they CS image exported as a GIF will not necessarily match? What of colors that work better in the CMYK space, or does it matter? Sorry, but I've a new monitor for web work and I am realizing that perhaps my success in this regard may have been dumb luck or delusion! TIA In article <11ckv4icdet2v74@news.supernews.com>, "johnboy" <okaynow@nospam.no> wrote: > If I have a web page and set the background to, say, #009933 (allegedly a > web-safe color) and then specify in CS the same color, then is it true that > they CS image exported as a GIF will not necessarily match? The images will not necessarily match on a computer whose video card is set to "thousands of colors" or "16-bit color" mode. The so-called "Web-safe" color palette is becoming less and less significant; it is only relevant for computer monitors set to 8-bit color (256 colors). Any non-Web-safe color will dither on a computer whose video card is set to 256 colors

Color Palette
In Photoshop CS, when I start the program & go to the Color Palette on the drop down menu the RGB Slider & CYMK Spectum is checked. When I open a new file, the check next to the RGM slider is moved to the Grayscale slider. It works fine for me in Photoshop 7.1. How do I fix it in Photoshop CS? TIA Jack

Updating color
I am using trimesh/trisurf to plot some rather large triangulated surfaces. I would like to make changes to the colour data without having to overwrite the entire plot. To avoid confusion, this would be 'C' in the call: >>trimesh(tri,X,Y,Z,C) I imagine the same operation would be applicable to any coloured plot. Is there anything I can do to enable this operation? Cheers, Dave. Dave F wrote: > > > I am using trimesh/trisurf to plot some rather large triangulated > surfaces. I would like to make changes to the colour data without > having to overwrite the enti

Background color
Hi. I have an strange problem today, I use IDL.7 under linux(ubuntu) . I try to change the background color. with below command I create the window. window,xsize=1400,ysize=1400 TVLCT,150,50,120,0 plot,x,y,/psym,yrange=[5.6,5.75],xrange=[9.5,11.8],charsize=3 ,title=' none ',background=180 /NoData I use both commands(TVLCT and background) and change the numbers ,but still the window is in black ! but when I write the TVLCT command in the terminal and run the file , the color changes!!!!!! how can I control the background color from inside of pro not terminal ?!! best,nakisa On Wed, 17 Dec 2008 06:29:13 -0800 (PST), nakisa <nakisa.nooraee@gmail.com> wrote: >Hi. >I have an strange problem today, I use IDL.7 under linux(ubuntu) . >I try to change the background color. with below command I create the >window. > >window,xsize=1400,ysize=1400 > >TVLCT,150,50,120,0 > >plot,x,y,/psym,yrange=[5.6,5.75],xrange=[9.5,11.8],charsize=3 ,title=' >none ',background=180 /NoData > > >I use both commands(TVLCT and background) and change the numbers ,but >still the window is in black ! >but when I write the TVLCT command

Color Transformations
Greetings, My boss has tasked me with something I have little experience in and am seeking the advice of the experts in this group. Thanks in advance for your help. Anyway, my task is to change all 'selected' colors to white in a 24bpp color bitmap. Essentially, I have to white out the color from scanned business forms to increase our OCR accuracy. The algorithm is similar to the magic wand feature in the various image processing packages. I have spent the last few days reading the news groups and have seen the various methods. I know I can use floodfill, set pixel etc to alter the bitmap. That is not my problem. The real challenge is how to determine which pixels to change. The user will enter a 'threshold' for the change of color and click on the bitmap in an area with the desired color to change. I will get the color of the pixel and change all pixels in the bitmap that fall within the range. I have read the news groups and realize again that there are several ways to solve this problem. I never realized that "similar color" could be so subjective:) To further complicate matters I spent most of my

color names
Hi, Is there any table in matlab that lists all possible colors? Thanks, Assaf Assaf Weinstein wrote: .... > Is there any table in matlab that lists all possible colors? .... I'd think that would be a rather long list if were using 24-bit, for example... -- Assaf Weinstein wrote: > Is there any table in matlab that lists all possible colors? If you are talking about RGB or HSV colours specified by three components, then NO -- such a table would have to have 2^24 (about 16 million) entries. If you are talking about the colour specifications known by simple letter or name to Matlab, then Yes: b -- blue c -- cyan g -- green k -- black (from the German Kol) m -- magenta o -- orange r -- red w -- white and that's it. For example, Matlab does not even have a color name for gray or pink. "Assaf Weinstein" <assafweinstein_remove.this@gmail.com> wrote in message <hn0u1m$naa$1@fred.mathworks.com>... > Hi, > > Is there any table in matlab that lists all possible colors? > > Thanks, > > Assaf a hint: - this FEX submission by jd might(!) come in handy as a first aid

color chart
I was hoping to make a color chart that went from white to black with all the intermediate colors smoothly following each other. So I took a file rgb.txt, sorted it in the triplet order and printed it out as a html doc to view in a browser. As you can see, from this abbreviated list, the colors are not progressions on the last color. #00FF7F 000 255 127 SpringGreen #00FFFF 000 255 255 cyan #030303 003 003 003 gray1 Obviously I don't understand "the color cube" nor how to sort colors to give me the desired result. Would appreciate any advice on how to sort colors... _not_, because of the reasons below. > > > what colour would come after black, > > dark red or blue or green, and what colour would progress into white ? > > or am i not understanding ? > > > > sammi Yes, well just one of those question I wish I never asked. Just been reading up about the color space and looking at the color space cube, I don't see anyway of getting a smooth transition other than starting at 0,0,0 and moving in helical way to 256,256,256 Even that would be unsatisfactory as it miss out on all the grays as well as the intermediate points like

Color LCD
Hi All, I'm busy with a new portable instrument to be used outdoors. I need to source a sunlight readable color LCD, preferably 5.7". Do any of you guys know where to source such a display? Pierre On Feb 27, 3:13 pm, "Pierre de Vos" <pierre.de...@webmail.co.za> wrote: > I'm busy with a new portable instrument to be used outdoors. I need to > source a sunlight readable color LCD, preferably 5.7". Do any of you Kyocera had some nice transflective and transmissive CSTN LCDs intended for PDA and GPS applications. "Pierre de Vos" <pierre.devos@webmail.co.za> wrote in message news:1172607125.501167@vasbyt.isdsl.net... > Hi All, > > I'm busy with a new portable instrument to be used outdoors. I need > to source a sunlight readable color LCD, preferably 5.7". Do any of > you guys know where to source such a display? > > Pierre A little while ago Arrow were trying to sell me a Hitachi transflective screen that was apparently good in sunlight (I only saw it indoors). From your e-mail address I guess you're in South Africa so this would be the link for you http

Background Color
I at one time before I even added anything to the layout got the whole color set to something other than white. I can't remember how I did it. I am using FMP 5.5 Carl in article c71fc.16397\$sV2.16014@newssvr22.news.prodigy.com, Iced Tea at icedteas@swbell.net wrote on 4/13/04 7:13 PM: > I at one time before I even added anything to the layout got the whole color > set to something other than white. I can't remember how I did it. I am > using FMP 5.5 > > Carl > > You can change the color of the parts by going to Layout, and selecting the tab for Body, Header, Footer, etc and then choosing the fill color from the tools on the left. HTH Lee

color tool
+-----------------------+ |+--------------------+ | || | | || fill with color | | || | | || | | |+--------------------+ | | Hex Value [#xxxxxx] | | Red: -----|------- | | Green: -----|------- | | Blue: -----|------- | +-----------------------+ That's basically what I want to do. I hope the sketch above came out well. Here's a description - just in case. I want to make a simple app that will have three JSliders that will represent RGB (red, green, blue). Also I want the hex value of the current color to be printed in a text field or something like that (so that it could be easily copied). Basically, I think i can do everything but I have no idea on how to compute the HEX values of a color. Or how to "bind" the JSliders with the hex value computing. I know this is actually the whole program but any help would be greatly appreciated. I'm newbie and still exploring the depths of Java. :) Thanks in advance! :) The Chief wrote: > That's basically what I want to do. I hope the sketch above came out > well. Here's a description - just in case. I want to make a simple app >