hex2rgba

Changes a hexidecimal color value into a rgb or rgba value.

Parameters

  • string $color — The hexidecimal value of the color to change.
  • float|bool $opacity — The opacity for the color. Leave blank if you want to use rgb only.

Returns

  • string — The color as a rgb or rgba value.

Since: 2.0

Source

  • /includes/classes/base/class-display.php — 330