Words with different colours in the same sentence

25 views
Skip to first unread message

Antonio

unread,
Sep 16, 2014, 5:19:20 PM9/16/14
to psychop...@googlegroups.com
Hi all,

I would like to write a sentence like this:
“White LIGHT is made of different colors” where the word “LIGHT” should be of a different color than the rest of the sentence.

So my question is: is it possible to display in the same screen words with different colours using the Builder?
If not, how can I do it by using the code?

Thanks,

Antonio

Jeremy Gray

unread,
Sep 16, 2014, 5:35:04 PM9/16/14
to psychop...@googlegroups.com
Hi Antonio,

I would like to write a sentence like this:
“White LIGHT is made of different colors” where the word “LIGHT” should be of a different color than the rest of the sentence.

So my question is: is it possible to display in the same screen words with different colours using the Builder?

yes, two ways (maybe more): 1) you need two text components, not just one. and you need to arrange their position carefully if you want one different-color word to appear to be part of a sentence. or 2) make your sentence in a word processing program or something else that gives you the desired control of text visual appearance, save as a single image, repeat for all stimuli, and display the images in PsychoPy (instead of text).

--Jeremy

Antonio

unread,
Sep 17, 2014, 1:57:38 PM9/17/14
to psychop...@googlegroups.com
Thanks Jeremy for your response.
For now I will use two text components but it would be great to use some markup language like
"White <style="color:red">LIGHT</style> is made of different colours".
Antonio
Reply all
Reply to author
Forward
0 new messages