question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

How to add specific color to object based on 4 parameters R G B A?

Hi Team,

I have to add specific color based on 4 parameter values R G B A as given below:

1720438076669.png

When I checked the color down, I found various options as below:

1720438157557.png

Currently, I am using last option where we can set the colors based on 3 parameter values R - 185 G - 110 B - 51. The 4th parameter A - 226 is required to make it more specific. How can I enter it in my model.

Could you help me how can I add it?

Thank you!

FlexSim 23.2.1
color changeitem color
1720438076669.png (6.5 KiB)
1720438157557.png (8.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Ankur A3,

Thank you for contributing to our community! We couldn't identify a maintained license or subscription linked to your account.

You may need to update your profile information to identify yourself as a license owner or their associate. Check out our article for how to ensure you receive timely support. If you update your profile comment back to let us know - we'll adjust the priority of your post accordingly.

If your current license is expired, please contact your local distributor to renew.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Ankur A3 commented

Just add the fourth number to the expression "Color(1, 0, 0, 0.9)". Though be aware of two things:

1) The RGBA numbers need to be scaled from 0-1 for the Color class. So divide the values you have by 255.

2) If you want to color flow items, those do not have a color node for the alpha value by default. You'd need to add it to the tree of the items in the Flow Item Bin. See the linked post below.

https://answers.flexsim.com/questions/167011/how-to-update-a-box-visuals.html

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ankur A3 avatar image Ankur A3 commented ·
Thanks for your quick response! @Felix Möhlmann

It's working now.

0 Likes 0 ·