Houdini 20.5 Nodes APEX nodes

string::ToRamp<T>

Converts a string to a ramp.

On this page
Since 20.0

Converts a string to a color or float ramp.

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

string: String

The string representation of a color or float ramp.

Outputs

ramp: ColorRamp, FloatRamp

The color or float ramp converted from string.

See also

APEX nodes