screen's background color

41 views
Skip to first unread message

Christophe Pallier

unread,
Mar 26, 2018, 5:22:26 AM3/26/18
to expyriment-users
Helle

When displaying a TextLine stimulus, the background_colour argument only applies to the rectangular surface where the text is rendered.
Is there a way to fill the entire screen with the background colour.

ideally, I would like to change the background colour for the whole expyriment (black is a problem).
I tried to modifiy the properties of the screen of the experiment object, but I failed.

Best,
 

Florian Krause

unread,
Mar 26, 2018, 5:46:14 AM3/26/18
to expyrime...@googlegroups.com
Hi Christophe,

you can change `expyriment.design.defaults.experiment_backround_colour` (http://docs.expyriment.org/expyriment.design.defaults.html#expyriment.design.defaults.expyriment.design.defaults.experiment_background_colour) before initializing.

Best,
Florian



--
You received this message because you are subscribed to the Google Groups "expyriment-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to expyriment-users+unsubscribe@googlegroups.com.
To post to this group, send email to expyriment-users@googlegroups.com.
Visit this group at https://groups.google.com/group/expyriment-users.
For more options, visit https://groups.google.com/d/optout.



--
www.fladd.de - Homepage of Florian Krause

Christophe Pallier

unread,
Mar 26, 2018, 6:01:37 AM3/26/18
to expyrime...@googlegroups.com
Thanks a lot ! I am still not very good navigating the documentation.


--
Christophe Pallier <chris...@pallier.org>
INSERM-CEA Cognitive Neuroimaging Lab, Neurospin, bat 145,
91191 Gif-sur-Yvette Cedex, France
Tel: 00 33 1 69 08 79 34
Personal web site: http://www.pallier.org
Lab web site: http://www.unicog.org

Oliver Lindemann

unread,
Mar 27, 2018, 10:22:26 AM3/27/18
to Christophe Pallier, expyrime...@googlegroups.com
hi,

there are two ways to do that. Either you plot a TextLine on a Canvas/BlankScreen:

tmp_stim = expyriment.stimuli.TextLine(text="Hello World", position=(-200, 100),
                                       background_colour=(255,0,0), text_colour=(255,255,255))
stim = expyriment.stimuli.BlankScreen(colour=tmp_stim.background_colour)
tmp_stim.plot(stim)

stim.present()

or, you change the colours of the whole experiment:

exp = expyriment.design.Experiment(background_colour=(255,0,0), foreground_colour=(255,255,255))
expyriment.control.initialize(exp)

Oliver
--
You received this message because you are subscribed to the Google Groups "expyriment-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to expyriment-use...@googlegroups.com.
To post to this group, send email to expyrime...@googlegroups.com.

Oliver Lindemann

unread,
Mar 27, 2018, 10:24:18 AM3/27/18
to expyrime...@googlegroups.com
Yes, the defaults and settings are really not well documented.

Oliver
To unsubscribe from this group and stop receiving emails from it, send an email to expyriment-use...@googlegroups.com.
To post to this group, send email to expyrime...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages