Can polygons for a cesium entity have alpha blended colors?

I was going off this example here:

And realized that all the geometry here was from primitives not cesium entities. Can entities have alpha blending so I can see some of the earth/map below them? I am trying this and it seems to be ignoring all my color and fill options:

var entitycesium = new Cesium.Entity();

entitycesium.name = jsonf.features[i].properties.name;

entitycesium.polygon=new Cesium.PolygonGraphics({

hierarchy : Cesium.Cartesian3.fromDegreesArray([

jsonf.features[i].geometry.coordinates[0][0][0],jsonf.features[i].geometry.coordinates[0][0][1],

jsonf.features[i].geometry.coordinates[0][1][0],jsonf.features[i].geometry.coordinates[0][1][1],

jsonf.features[i].geometry.coordinates[0][2][0],jsonf.features[i].geometry.coordinates[0][2][1],

jsonf.features[i].geometry.coordinates[0][3][0],jsonf.features[i].geometry.coordinates[0][3][1],

jsonf.features[i].geometry.coordinates[0][4][0],jsonf.features[i].geometry.coordinates[0][4][1],

]),

outline:true,

outLineColor : Cesium.Color.RED,

material : Cesium.Material.fromType(‘Color’, { color : new Cesium.Color(1.0, 0.0, 0.0, 1.0)})

});

entitycesium.description= ‘<a href="’ + jsonf.features[i].properties.file_name + ‘">Full Resolution Viewer’;

viewer.entities.add(entitycesium);

Is there anyway to get alpha blending?

Hello,

Sorry, but I’m a little confused by what you’re asking.

For polygons entities, please see this example: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polygon.html&label=Geometries

Both the blue and orange polygons have alpha values. You can use Color.withAlpha to add an alpha value to an existing color.

If this doesn’t answer your question, can you elaborate a little bit about what you’re trying to do? Thanks!

Best,

Hannah

I might be over thinking this, but I am just trying to get a georeferenced foot print on the map, but colored semi opaque. This did do something with the material colorWithAlpha (the foot print is red!) but it is solid, no matter what
number I use as an alpha value, and I wanted it semi translucent… no idea why any number from 1 to 0 is solid red

var entitycesium = new Cesium.Entity();

entitycesium.name = jsonf.features[i].properties.name;

entitycesium.polygon=new Cesium.PolygonGraphics({

hierarchy : Cesium.Cartesian3.fromDegreesArray([

jsonf.features[i].geometry.coordinates[0][0][0],jsonf.features[i].geometry.coordinates[0][0][1],

jsonf.features[i].geometry.coordinates[0][1][0],jsonf.features[i].geometry.coordinates[0][1][1],

jsonf.features[i].geometry.coordinates[0][2][0],jsonf.features[i].geometry.coordinates[0][2][1],

jsonf.features[i].geometry.coordinates[0][3][0],jsonf.features[i].geometry.coordinates[0][3][1],

jsonf.features[i].geometry.coordinates[0][4][0],jsonf.features[i].geometry.coordinates[0][4][1],

]),

outline:true,

outLineColor : Cesium.Color.RED,

material : Cesium.Color.RED.withAlpha(0.3),

});

entitycesium.description= ‘<a href="’ + jsonf.features[i].properties.file_name + ‘">Full Resolution Viewer’;

viewer.entities.add(entitycesium);

Never mind, i changed the color from RED to green and could more easily see what was underneath, I had to give the value to the withAlpha of .1 though But looks good thanks!