Houdini 20.5 Nodes APEX nodes

string::FromRamp<T>

Converts a ramp to a string.

On this page
Since 20.0

Converts a color or float ramp to a string.

Below is an example of a string representation of a ramp:

{\n\t\"colortype\":\"RGB\",\n\t\"points\":
[2,\n\t\t{\n\t\t\t\"t\":0,\n\t\t\t\"rgba\":
[0,0,0,1],\n\t\t\t\"basis\":\"linear\"\n\t\t},
\n\t\t{\n\t\t\t\"t\":1,\n\t\t\t\"rgba\":
[1,1,1,1],\n\t\t\t\"basis\":\"linear\"\n\t\t}\n\t]\n}\n

With the \n displayed as newlines, and \t as tabs:

{
    "colortype":"RGB",
    "points":[2,
        {
            "t":0,
            "rgba":[0,0,0,1],
            "basis":"linear"
        },
        {
            "t":1,
            "rgba":[1,1,1,1],
            "basis":"linear"
        }
    ]
}

Inputs

ramp: ColorRamp, FloatRamp

The color or float ramp to convert.

Outputs

string: String

The string representation of ramp.

See also

APEX nodes