Add Color Constructor Nodes
Resolves #2774
Adds the following:
color crate function:
from_cmyka() function to convert CMYKA to RGBA
Nodes:
All nodes clamp input to 0 -> 1 before passing to matching function in color crate
construct_color_rgba() accepts f32 inputs in RGBA format and outputs a color construct_color_hsla() accepts f32 inputs in HSLA format and outputs a color ConstructColorDemo.zip
construct_color_grayscale() accepts a single f32 luminance input and outputs a color construct_color_cmyka() accepts f32 inputs in CMYKA format and outputs a color
I am struggling to understand more complex node construction. These could likely get merged, but I couldn't figure out how to create options that swap out inputs.
Demo: ConstructColorDemo.zip
The squares in the background test the four nodes in order from the center out. The dots in the foreground demonstrate a more practical use, deriving color from the instance index in a way that can't be done with a simple gradient.
I'll mark this as a draft for the moment while awaiting the requested code review changes for the naming scheme and parameter types. Please mark it as ready for review once resolved, thanks!
!build
| 📦 Build Complete for 541ec145e7e1fd858a397f68f07cd54f27cacbda |
|---|
| https://0938a41a.graphite.pages.dev |
I see there is a conflict, can you please resolve it? And once this is fully ready for review, please mark it as such so it's not a draft (I ignore drafts when working through my review queue).