Skip to content
  1. API
  2. Types

OpacityValue

Type: number

Value between 0 (transparent) and 1 (opaque) indicating the opacity of the node/edge. Note that Ogma doesn't perform real opacity, but background blending: the lower the opacity value is, the more the color of the node/edge is blended towards the background color, but it retains its original alpha value. This has one important implication: when using a transparent background and an image is displayed behind Ogma, it is necessary to set the RGB values to the background color that are close to the image, even if the color is transparent. For example, assuming the image is mainly grey, you should do ogma.setOptions({backgroundColor: "rgba(128, 128, 128, 0)"}) so the nodes/edges are nicely blended towards the image color.