blackchicken 16 Posted November 20, 2019 Hello I`m stuck with setting correct color to nodes. I would like to set value with HSV. I want to do slight automatic gradient when I creating nodes in network box this one work in RGB: my_list = [nullA, nullB, nullC, nullD] loop = 0 nodePos = -1 for node in my_list: node.setColor(hou.Color(0.3, 0.5 * loop, 0.8)) node.setPosition(hou.Vector2(0, loop * nodePos)) loop += 1 but cant find the way how to set values with HSV, from doc should be something like this: my_list = [nullA, nullB, nullC, nullD] loop = 0 nodePos = -1 for node in my_list: node.setColor(hou.Color().setHSV(50, 0.5 * loop, 0.8)) node.setPosition(hou.Vector2(0, loop * nodePos)) loop += 1 Thanks for help, Jan Share this post Link to post Share on other sites
symek 389 Posted November 20, 2019 29 minutes ago, blackchicken said: my_list = [nullA, nullB, nullC, nullD] loop = 0 nodePos = -1 for node in my_list: node.setColor(hou.Color().setHSV(50, 0.5 * loop, 0.8)) node.setPosition(hou.Vector2(0, loop * nodePos)) loop += 1 hou.Color().setHSV expects a tuple of floats, not three floats: for node in nodes: color = hou.Color() hsv = (hou.hmath.rand(node.sessionId())*360, .9, .9) color.setHSV(hsv) node.setColor(color) Share this post Link to post Share on other sites
blackchicken 16 Posted November 21, 2019 Thanks a lot Symek, still soo much to learn Share this post Link to post Share on other sites
symek 389 Posted November 21, 2019 cheers! I feel it all the time Share this post Link to post Share on other sites