This topic describes the ST_MaterialFromText function. This function constructs a material object from the text representation of the material object.

Syntax

material ST_MaterialFromText(text text);

Parameters

Parameter Description
text The material object in text representation.

Description

This function constructs a material object from the text representation of the material object. For more information, see ST_MakeMaterial.

Examples

SELECT ST_AsText(ST_materialFromText(ST_AsText(ST_MakeMaterial(ambient =>'#FFDDEEAA'))));

-------------------------
{"type":"raw", "attributes": {"ambient":"#ffddeeaa"}}