Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Experimental Control
 CIGAL question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gregory.mccarthy
BIAC Alum

USA
26 Posts

Posted - Mar 21 2003 :  08:56:33 AM  Show Profile  Reply with Quote
Dear CIGAL mavens,

We have a CIGAL ShowPlay ppf that presents many words at a rate of 2/sec. The words are displayed using character writing to the screen, not by displaying PCX files of words (as we often do). The characters are all in the same black font. Is it possible with Showplay to display a small subset of the words in a different color font?

Thanks,

Greg and Michele

ayse.belger
BIAC Faculty

USA
14 Posts

Posted - Mar 21 2003 :  09:22:22 AM  Show Profile  Visit ayse.belger's Homepage  Reply with Quote
I think that this is actually what we do for the Turner study. We present lists of words, not pcx files, and the words appear in different colors, depending upon whether they are encoded, distractors or retrieval stimuli. I would be glad to send the Cigal code to Michelle.

Ayse

Edited by - ayse.belger on Mar 21 2003 09:23:16 AM
Go to Top of Page

diaz
BIAC Alum

USA
212 Posts

Posted - Apr 14 2003 :  09:35:10 AM  Show Profile  Reply with Quote
For anyone who is interested in using colored fonts in Cigal, there are two ways of which I've learned. There may be others, but I know these two work.

Colored font on a white background:
When presenting textstrings, preceed the stimulus line by a textcolor line. This will change the font color to whatever you have specified, until another textcolor line is used. So a few lines of code would look like this.

textcolor 5 1 500 0
"##QHJVNTI###" 4 1 500 500 -1 -1
"###FSDQO####" 4 1 1000 500 -1 -1
"###BQMRY####" 4 1 1500 500 -1 -1
"####CXCO####" 4 1 2000 500 -1 -1
"###KVHTRQ###" 4 1 2500 500 -1 -1
textcolor 6 1 3000 65280
"###RBMFL####" 4 1 3000 500 -1 -1

In the textcolor line the second column (5/4/6) is the stimulus code, the 4th column is when to start displaying that color and the 5th column is the color you want to display in numerical format (0 is black and 65280 is a shade of green).

Determining what number to use in the 5th column, can be done in the following way:
multiply the red quantity by 256*256 (or 65536), green by 256 and blue by 1 and add the three.

Thus, "white" (which is 255 Red, 255 Green, 255 Blue) would be:
255 * 65536 +
255 * 256 +
255 = 16777215

"red" (255 Red, 0 Green, 0 Blue) would be
255 * 65536 +
255 * 0 +
0 = 16711680

Colored font on a black background:
Changing the color can also be done by adding a few columns. In making the font colored this way, I've only been able to get the textstring to come up as a colored font in a little black box (even if the overall background is set to white).

"MOUNT" 100 1 10500 1000 -1 -1 18 16711680 0

In this example, the 8th column is the font, and the 9th column is the color in numerical format. I'm not sure what the 10th column does.

Michele T. Diaz, Ph.D.
Associate Director
Brain Imaging and Analysis Center

Edited by - diaz on Oct 28 2003 11:47:20 AM
Go to Top of Page

abhijit.vijay
BIAC Alum

USA
10 Posts

Posted - Jul 01 2003 :  12:10:14 PM  Show Profile  Visit abhijit.vijay's Homepage  Reply with Quote
<Quoting Michele>

! Colored font on a black background:
! Changing the color can also be done by adding a few columns. In
! making the font colored this way, I've only been able to get the
! textstring to come up as a colored font in a little black box
! (even if the overall background is set to white).

! "MOUNT" 100 1 10500 1000 -1 -1 18 16711680 0

! In this example, the 8th column is the font, and the 9th column is
! the color in numerical format. I'm not sure what the 10th column
! does.

Thank you Michele for posting this piece of information. Regarding the 10th column, it stands for the "back color" for the text. 0 means black (0 or red + 0 of green + 0 of blue) This is also the reason why the text is appearing in black as you have observed. If you set it to white, (16777215), the black box would no longer appear.

Abhijit.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.41 seconds. Snitz Forums 2000