Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- import colorsys
- rgb = bpy.data.materials["Material"].node_tree.nodes["Principled BSDF"].inputs[0].default_value
- hsv = colorsys.rgb_to_hsv(rgb[0], rgb[1], rgb[2])
- hue = hsv[0]
- mid_point = 0.5
- if hue < mid_point:
- hue = hue + mid_point
- else:
- hue = hue - mid_point
- print(hue)
Advertisement
Add Comment
Please, Sign In to add comment