Raxol. Effects. BorderBeam. Colors
(Raxol v2.6.0)
View Source
Color palettes and gradient logic for the BorderBeam effect.
Four variants mirroring the original border-beam React component: colorful (rainbow), mono (grayscale), ocean (blue-purple), sunset (orange-red).
Summary
Functions
Returns the beam head color at the given animation progress.
Returns the dim outer bloom color for a variant.
Returns CSS hex for the bloom color of a variant.
Returns CSS hex for the glow color of a variant.
Returns CSS gradient stops string for the conic-gradient beam stroke.
Returns the CSS hex palette for a variant.
Returns the muted inner glow color for a variant.
Returns the terminal color palette for a variant.
Returns the palette as a tuple for O(1) elem/2 access. Use this in
per-cell hot loops to avoid the O(n) cost of Enum.at(list, idx).
Returns the trail color for a cell at distance_normalized (0.0-1.0)
behind the beam head.
Types
@type color() :: atom()
@type variant() :: :colorful | :mono | :ocean | :sunset | :electric | :neon | :matrix
Functions
Returns the beam head color at the given animation progress.
progress is 0.0-1.0 through the animation cycle.
When static_colors is true, always returns the first palette color.
Returns the dim outer bloom color for a variant.
Returns CSS hex for the bloom color of a variant.
Returns CSS hex for the glow color of a variant.
Returns CSS gradient stops string for the conic-gradient beam stroke.
Returns the CSS hex palette for a variant.
Returns the muted inner glow color for a variant.
Returns the terminal color palette for a variant.
Returns the palette as a tuple for O(1) elem/2 access. Use this in
per-cell hot loops to avoid the O(n) cost of Enum.at(list, idx).
Returns the trail color for a cell at distance_normalized (0.0-1.0)
behind the beam head.