General / 12 February 2022

Getting Hex Colors for nuke

  • These are just some python notes I have taken doing visual effect as a compositor and decided put it up here


  • This is useful if you want to make a node a certain color


Example:

b = nuke.createNode('Blur')
b['tile_color'].setValue(0x253d23ff)


Option 1:

Simple way to do this is by:

  1. Create a node
  2. use the tile knob to change the color of the node to something you like
  3. Copy node into a text editor
  4. In the text editor it will display the color.


Option 2:

In the script editor simply write:

col = nuke.getColor()
print col


  1. Once you have written and run the code - A color wheel will appear
  2. Select your favourite color and press "ok"
  3. Once you price "ok" the Script editor will print the hex color Value.



There is a Tool made by  Lundy Hu that makes all this super easy. I recommend checking it out.

http://www.nukepedia.com/gizmos/colour/color-picker