﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » Changing the color of pictures?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 24 Sep 2026 12:51:37 GMT</lastBuildDate><ttl>20</ttl><item><title>Changing the color of pictures?</title><link>https://forums.millisecond.com/Topic25105.aspx</link><description>I'm running an experiment that presents stimuli that I've created externally in Illustrator. The stimuli are novel squiggly shapes. The main task is a color memory task, so I need the color of the shape to be able to changechange. I know that you can change the color of circles, squares, etc, but can you do this with jpg/pngs, etc? The image is just white and black, and I'd like to be able to select all the white (255 255 255) values and change them to some specified color. I see there is a "transparent color" attribute for pictures where you can select a certain color and make it transparent, but can you do a similar thing to select a color and change it?&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 18 Jun 2018 11:28:23 GMT</pubDate><dc:creator>ritvov</dc:creator></item><item><title>RE: Changing the color of pictures?</title><link>https://forums.millisecond.com/Topic25115.aspx</link><description>&lt;div data-id="25114" class="if-quote-wrapper" unselectable="on" data-guid="1529346256923"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25114" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25114" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25114" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ritvov - Monday, June 18, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25114"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="25107" class="if-quote-wrapper" unselectable="on" data-guid="1529346256923"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25107" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25107" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25107" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, June 18, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25107"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="25105" class="if-quote-wrapper" unselectable="on" data-guid="1529346256923"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25105" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25105" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25105" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ritvov - Sunday, June 17, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25105"&gt;&lt;div class="if-quote-message-margin"&gt;I'm running an experiment that presents stimuli that I've created externally in Illustrator. The stimuli are novel squiggly shapes. The main task is a color memory task, so I need the color of the shape to be able to changechange. I know that you can change the color of circles, squares, etc, but can you do this with jpg/pngs, etc? The image is just white and black, and I'd like to be able to select all the white (255 255 255) values and change them to some specified color. I see there is a "transparent color" attribute for pictures where you can select a certain color and make it transparent, but can you do a similar thing to select a color and change it?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25105"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;There is no way to change the color of pictures or replace colors on the fly. There is however a trick which might work: You can exploit PNGs transparency: I.e. make the "squiggly shape" not a solid color like black or white, but have it be transparent. Then you can display a &amp;lt;shape&amp;gt; behind the &amp;lt;picture&amp;gt; and manipulate that &amp;lt;shape&amp;gt;'s color as needed. The result should be that it looks as if the image changes color. I.e. something like this (attached):&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mypicture&amp;gt;&lt;br/&gt;/ items = ("image.png")&lt;br/&gt;/ size = (50%, 30%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape myshape&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (32%, 30%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-6 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape.myshape.color = list.colors.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=myshape, mypicture]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list colors&amp;gt;&lt;br/&gt;/ items = (red, green, blue, yellow, purple, orange, grey)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25107"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Hi Dave,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks for your response, again. This leads me to some follow up questions. Essentially, on every trial I want to present a color wheel, and the participant clicks the point on the wheel that matches their memory for that item. When the cursor is over a color on the color wheel, the central image (or, with your workaround, the central square behind the transparent image) will take on that color-- otherwise the central image would be white (see attached). &lt;br/&gt;&lt;br/&gt;So, my follow up questions are 1) Is there a way to continuously update the color of the central square within one trial, dependent on where the mouse is positioned? 2) How do I make it so it only changes color when the cursor is within the space of the color wheel? For #2, I know there is the "valid response" attribute for the trial, but I'm not sure how this would work for a space that is essentially a donut. Thank you again!&lt;br/&gt;&lt;br/&gt;&lt;img src="https://www.millisecond.com/forums/Uploads/Images/1a243c8e-bccc-477d-8ec8-5878.png" data-download-url="https://www.millisecond.com/forums/Uploads/Images/dbae8c3f-5118-4e55-b854-87f8.png"&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25114"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;&amp;gt; 1) Is there a way to continuously update the color of the central square within one trial, dependent on where the mouse is positioned?&lt;br/&gt;&lt;br/&gt;No. You would essentially continuously loop a trial, i.e. run multiple trials in a row, not a single one. This can, however, LOOK like a single trial that continuously updates the color to the participant.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2) How do I make it so it only changes color when the cursor is within the space of the color wheel?&lt;br/&gt;&lt;br/&gt;You'd have to code some &amp;lt;expressions&amp;gt; that check where the cursor / mouse is located at the time of response (i.e. inside or outside the wheel) and then use /isvalidresponse logic in the &amp;lt;trial&amp;gt; to either accept or reject the response.&lt;br/&gt;</description><pubDate>Mon, 18 Jun 2018 11:28:23 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Changing the color of pictures?</title><link>https://forums.millisecond.com/Topic25114.aspx</link><description>&lt;div data-id="25107" class="if-quote-wrapper" unselectable="on" data-guid="1529345002103"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25107" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25107" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25107" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, June 18, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25107"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="25105" class="if-quote-wrapper" unselectable="on" data-guid="1529345002103"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25105" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25105" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25105" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ritvov - Sunday, June 17, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25105"&gt;&lt;div class="if-quote-message-margin"&gt;I'm running an experiment that presents stimuli that I've created externally in Illustrator. The stimuli are novel squiggly shapes. The main task is a color memory task, so I need the color of the shape to be able to changechange. I know that you can change the color of circles, squares, etc, but can you do this with jpg/pngs, etc? The image is just white and black, and I'd like to be able to select all the white (255 255 255) values and change them to some specified color. I see there is a "transparent color" attribute for pictures where you can select a certain color and make it transparent, but can you do a similar thing to select a color and change it?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25105"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;There is no way to change the color of pictures or replace colors on the fly. There is however a trick which might work: You can exploit PNGs transparency: I.e. make the "squiggly shape" not a solid color like black or white, but have it be transparent. Then you can display a &amp;lt;shape&amp;gt; behind the &amp;lt;picture&amp;gt; and manipulate that &amp;lt;shape&amp;gt;'s color as needed. The result should be that it looks as if the image changes color. I.e. something like this (attached):&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mypicture&amp;gt;&lt;br/&gt;/ items = ("image.png")&lt;br/&gt;/ size = (50%, 30%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape myshape&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (32%, 30%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-6 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape.myshape.color = list.colors.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=myshape, mypicture]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list colors&amp;gt;&lt;br/&gt;/ items = (red, green, blue, yellow, purple, orange, grey)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25107"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Hi Dave,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks for your response, again. This leads me to some follow up questions. Essentially, on every trial I want to present a color wheel, and the participant clicks the point on the wheel that matches their memory for that item. When the cursor is over a color on the color wheel, the central image (or, with your workaround, the central square behind the transparent image) will take on that color-- otherwise the central image would be white (see attached). &lt;br/&gt;&lt;br/&gt;So, my follow up questions are 1) Is there a way to continuously update the color of the central square within one trial, dependent on where the mouse is positioned? 2) How do I make it so it only changes color when the cursor is within the space of the color wheel? For #2, I know there is the "valid response" attribute for the trial, but I'm not sure how this would work for a space that is essentially a donut. Thank you again!&lt;br/&gt;&lt;br/&gt;&lt;img src="https://www.millisecond.com/forums/Uploads/Images/1a243c8e-bccc-477d-8ec8-5878.png" data-download-url="https://www.millisecond.com/forums/Uploads/Images/dbae8c3f-5118-4e55-b854-87f8.png"&gt;</description><pubDate>Mon, 18 Jun 2018 11:09:37 GMT</pubDate><dc:creator>ritvov</dc:creator></item><item><title>RE: Changing the color of pictures?</title><link>https://forums.millisecond.com/Topic25112.aspx</link><description>&lt;div data-id="25107" class="if-quote-wrapper" unselectable="on" data-guid="1529343631863"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25107" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25107" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25107" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, June 18, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25107"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="25105" class="if-quote-wrapper" unselectable="on" data-guid="1529343631863"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25105" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25105" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25105" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ritvov - Sunday, June 17, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25105"&gt;&lt;div class="if-quote-message-margin"&gt;I'm running an experiment that presents stimuli that I've created externally in Illustrator. The stimuli are novel squiggly shapes. The main task is a color memory task, so I need the color of the shape to be able to changechange. I know that you can change the color of circles, squares, etc, but can you do this with jpg/pngs, etc? The image is just white and black, and I'd like to be able to select all the white (255 255 255) values and change them to some specified color. I see there is a "transparent color" attribute for pictures where you can select a certain color and make it transparent, but can you do a similar thing to select a color and change it?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25105"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;There is no way to change the color of pictures or replace colors on the fly. There is however a trick which might work: You can exploit PNGs transparency: I.e. make the "squiggly shape" not a solid color like black or white, but have it be transparent. Then you can display a &amp;lt;shape&amp;gt; behind the &amp;lt;picture&amp;gt; and manipulate that &amp;lt;shape&amp;gt;'s color as needed. The result should be that it looks as if the image changes color. I.e. something like this (attached):&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mypicture&amp;gt;&lt;br/&gt;/ items = ("image.png")&lt;br/&gt;/ size = (50%, 30%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape myshape&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (32%, 30%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-6 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape.myshape.color = list.colors.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=myshape, mypicture]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list colors&amp;gt;&lt;br/&gt;/ items = (red, green, blue, yellow, purple, orange, grey)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25107"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Thank you! This should work for me.&amp;nbsp;</description><pubDate>Mon, 18 Jun 2018 10:40:47 GMT</pubDate><dc:creator>ritvov</dc:creator></item><item><title>RE: Changing the color of pictures?</title><link>https://forums.millisecond.com/Topic25107.aspx</link><description>&lt;div data-id="25105" class="if-quote-wrapper" unselectable="on" data-guid="1529334194409"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25105" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25105" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25105" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ritvov - Sunday, June 17, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25105"&gt;&lt;div class="if-quote-message-margin"&gt;I'm running an experiment that presents stimuli that I've created externally in Illustrator. The stimuli are novel squiggly shapes. The main task is a color memory task, so I need the color of the shape to be able to changechange. I know that you can change the color of circles, squares, etc, but can you do this with jpg/pngs, etc? The image is just white and black, and I'd like to be able to select all the white (255 255 255) values and change them to some specified color. I see there is a "transparent color" attribute for pictures where you can select a certain color and make it transparent, but can you do a similar thing to select a color and change it?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25105"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;There is no way to change the color of pictures or replace colors on the fly. There is however a trick which might work: You can exploit PNGs transparency: I.e. make the "squiggly shape" not a solid color like black or white, but have it be transparent. Then you can display a &amp;lt;shape&amp;gt; behind the &amp;lt;picture&amp;gt; and manipulate that &amp;lt;shape&amp;gt;'s color as needed. The result should be that it looks as if the image changes color. I.e. something like this (attached):&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mypicture&amp;gt;&lt;br/&gt;/ items = ("image.png")&lt;br/&gt;/ size = (50%, 30%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape myshape&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (32%, 30%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-6 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape.myshape.color = list.colors.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=myshape, mypicture]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list colors&amp;gt;&lt;br/&gt;/ items = (red, green, blue, yellow, purple, orange, grey)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 18 Jun 2018 08:17:05 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>