HexColor v1.1
This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0, 9.0, 8.0, 7.1, 7.0, 6.3, 6.2, 6. or later
Linux, Mac, Windows
Overview:
This Node works like a Constant.
Except you can choose your color value by entering a
- Hexadecimal color
- standard Nuke float color
- RGB 8bit color
More Information:
- Changing any value will update all other values respectively
- Colorspace conversions are taken into consideration. sRGB should do the job in the most cases though
- If bugs are found, please comment ;)
How to Install:
- the download contains a .nk file and can be pasted in live scripts
- for permanent installation, copy the HexColor.nk file to 'C:\Users\username\.nuke'
- edit the file 'C:\Users\username\.nuke\menu.py' and add the following line:
nuke.menu('Nodes').addCommand('Other/HexColor', lambda: nuke.createNode('HexColor.nk'))
Comments
EDIT: Temp fix is to write expression in each RGB Float value to be the below divided by 255
When i input any HEX value, the RGB changes to the correct value, but the float does not.
The script editor says the following:
ValueError: unable to sample node for given channel (rgba.red) at current context
NukeX 11.0v1
version 10.5 v5
push $cut_paste_input
Expression {
expr0 input.color_8bit_r/255
expr1 input.color_8bit_g/255
expr2 input.color_8bit_b/255
name Converter
selected true
xpos -2460
ypos -897
}
The idea was to have a live conversion between all of the input fields.
I implemented a sample function to make use of the sRGB colorspace, so a web color is translated correctly.For now I only have issues, when Linear is set as colorspace.
Maybe a solution would be better with a switch at the end that is set to whatever conversion was done last and to avoid the nuke.sample() function, which is the cause of many errors.
edit: more difficult that I thought, because I still need to translate the values into the other knobs, after being procssed by the colorspace. Only way I can think of now is to find a python or TCL implementation of colorspaces (or just sRGB)
edit2: found this: www.cyril-richon.com/blog/2019/1/23/python-srgb-to-linear-linear-to-srgb and probably gonna implement this down the road.
https://learn.foundry.com/nuke/developers/latest/pythondevguide/_autosummary/nuke.Node.html#nuke.Node.sample
RSS feed for comments to this post