@use "sass:string";

/// Build an rgba-like color from any source color expression.
/// @param {Color | String} $color - Source color, supports CSS vars such as fi-var(secondary).
/// @param {Number} $alpha [1] - Alpha channel value in range 0..1.
/// @example
///   color: fi-rgba(fi-var(secondary), 0.2);
@function fi-rgba($color, $alpha: 1) {
  @return rgb(from $color r g b / $alpha);
}
