# Color indication at the end of a script

hello,

I have a script that produces a number at the end.
I am using IF node to see if these values are above or below value x

the example below produced 86.4 and see if its above value x = 70.
Of course everybody knows 86.4 is above 70 and you might be wondering why I’m using IF statement to produce YES or No.

I have bunch of scripts like this and the user needs to see how many scripts have Yes or No.

That being said, I am curious if there is a way where I can create a color code at the end of my IF statement to clearly emphasize the results of each script. I used paint tool to represent what I have in mind below.

Please let me know if you have further question

Hi @mrkpkimEMSRM,
See if this helps

Watch 3D.dyn (22.2 KB)

Another option would be to supply two images (red and green into the if node’s input) and then use the Image Watch node to see the output.

3 Likes

thank you very much. truly appreciated.

could you quickly tell me how to supply images? thank you!

You’re welcome @mrkpkimEMSRM,
Here are a few more options.

I would recommend using Option - 1 or Option - 2
Result in Color.dyn (33.1 KB)

4 Likes

thank you @AmolShah for presenting several options.
I truly appreciate it. learning a lot.

The first option seem to be the best for my case.
I should’ve asked this earlier but have a quick question.

right now by using IF statement, we have; (P = produced value at the end)
Green = 70 < P
Red = 70 > P

is there a way where I can add YELLOW where it indicates 70>P>60 a.k.a the value is very near the qualifying bar.

so

Green = 70 < P
Yellow = 70 > P > 60
Red = 60 > P

I’m guessing IF statement won’t work here since it now has three conditions.

thank you very very much in advance!

In that case, @mrkpkimEMSRM you will have to use a nested if like this

``````Red = Color.ByARGB(255, 255, 0, 0);
Yellow = Color.ByARGB(255, 255, 255, 0);
Green = Color.ByARGB(255, 0, 255, 0);
x>=70?Green:x<=60?Red:Yellow;``````
1 Like

thank you very much.
truly appreciated!

1 Like