Convert int to byte

Hello, maybe is a silly question but I’m getting crazy with this. I’m trying to change the colors of some elements in view but using integers the colors are very dark because the class needs byte not integers. I have used all methods that I have found in stackoverflow, etc. to convert the numbers but with no success.

Did you do something similar?

Thanks in advance.

Can you post a screenshot of exactly what you’re dealing with? I believe most Revit colors will take either RGB or decimal formats. The Springs package has a node for converting RGB to decimal if that’s what you need.
image

1 Like

This works perfect to me! I needed it for my code in python and inside of the node of Springs I can take the solution. Thanks a lot, Nick!

Regards :slight_smile: