Skip to content

alpha

Input Stack:
alpha: String
TimeSeriesExpr
Output Stack:
StyleExpr
 

Set the alpha value for the colors on the line. The value should be a two digit hex number where 00 is transparent and ff is opaque.

Since :color includes its own alpha channel, the order of operations matters: if :color is applied after :alpha, it will override the alpha setting. However, :alpha applied after :color will modify the alpha channel of the previously set color.

Parameters

  • alpha: A two-digit hexadecimal value from 00 (transparent) to ff (opaque)

Examples

Basic alpha transparency applied to a stacked area chart:

BeforeAfter
name,sps,:eq,
:sum,
:stack
name,sps,:eq,
:sum,
:stack,
40,:alpha

Applying alpha after color modifies the alpha channel of the color:

BeforeAfter
name,sps,:eq,
:sum,
:stack,
f00,:color
name,sps,:eq,
:sum,
:stack,
f00,:color,
40,:alpha
  • :color - Set explicit color (interaction depends on order of operations)
  • :palette - Set color palette for multiple lines