Vega + Sankey Diagram Color Change

In the marks array, find the code for the text mark (shown below,) and add a fill property with the color you want, i.e. "fill": {"value": "red"}. I've added it to the code below for illustration.

My code may be a bit different from the version you linked to in your post, but this should point you in the right direction.

Astrit

{
  "type": "text",
  "from": {"data": "groups"},
  "interactive": false,
  "encode": {
    "update": {
      "x": {
        "signal": "scale('x', datum.stack) + (datum.rightLabel ? bandwidth('x') + 8 : -8)"
      },
      "yc": {
        "signal": "(datum.scaledY0 + datum.scaledY1)/2"
      },
      "align": {
        "signal": "datum.rightLabel ? 'left' : 'right'"
      },
      "baseline": {"value": "middle"},
      "fontWeight": {"value": "bold"},
      "fill": {"value": "red"},
      "text": {
        "signal": "abs(datum.scaledY0-datum.scaledY1) > 13 ? datum.grpId : ''"
      }
    }
  }
}