Hi, I tried to convert HSV color space to RGB using simple Python script but it looks like it doesn't work in Xpresso :
import c4d
import colorsys
def main() -> None:
global Output1
Output1 = colorsys.hsv_to_rgb(Input1,Input2,Input3)
Should I use different way to create conversion node inside Xpresso ?
This doesn't work too :
import c4d
from c4d import utils
def hsv_to_rgb(h, s, v):
r, g, b = utils.HSVToRGB(h, s, v)
return r, g, b
def main():
# Example HSV values
h = 0.5 # Hue (0.0 to 1.0)
s = 0.8 # Saturation (0.0 to 1.0)
v = 0.9 # Value (0.0 to 1.0)
# Convert HSV to RGB
r, g, b = hsv_to_rgb(h, s, v)
if __name__ == '__main__':
main()