Files
MapLibreParticleLab/metrics/integration/expression-tests/to-rgba/basic/test.json
2023-03-25 14:46:49 +01:00

20 lines
563 B
JSON

{
"expression": ["to-rgba", ["get", "x"]],
"inputs": [
[{}, {"properties": {"x": "red"}}],
[{}, {"properties": {"x": "rgba(0, 255, 0, 1)"}}],
[{}, {"properties": {"x": [0, 255, 0, 1]}}],
[{}, {"properties": {"x": [0, 0, 255]}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "array<number, 4>"
},
"outputs": [[255, 0, 0, 1], [0, 255, 0, 1], [0, 255, 0, 1], [0, 0, 255, 1]],
"serialized": ["to-rgba", ["to-color", ["get", "x"]]]
}
}