BraccatoTheme

data class BraccatoTheme(val textColor: Color = Color.White, val activeOpacity: Float = 1.0f, val inactiveOpacity: Float = 0.3f, val glowColor: Color = Color.White.copy(alpha = 0.5f), val translatedColor: Color = Color.White.copy(alpha = 0.6f), val lyricActiveColor: Color? = null, val lyricInactiveColor: Color? = null, val fontFamily: FontFamily? = null, val fontSize: Dp = 48.dp, val fontWeight: FontWeight = FontWeight.Bold, val lineHeight: Float = 1.333f, val rtlFontFamily: FontFamily? = FontFamily.Default, val translatedFontFamily: FontFamily? = null, val translatedFontSize: Dp = 32.dp, val translatedFontWeight: FontWeight = FontWeight.SemiBold, val romanizedFontSize: Dp? = null, val creditsLabel: String = "Written by", val creditsOpacity: Float = 0.2f, val creditsFocusedOpacity: Float = 0.85f, val linePadding: Dp = 32.dp, val scale: Float = 0.95f, val activeScale: Float = 1.0f, val animations: BraccatoAnimations = BraccatoAnimations(), val scaleTransitionMs: Double = 166.0, val lineEnterEasing: Easing = CssEasing.Ease, val lineExitEasing: Easing = CssEasing.Ease, val highlightFadeInMs: Double = 330.0, val highlightFadeOutMs: Double = 500.0, val highlightFadeInEasing: Easing = CssEasing.Ease, val highlightFadeOutEasing: Easing = CssEasing.Ease, val swipeEasing: Easing = LinearEasing, val swipeEasingName: String = "linear", val swipeStartFrom: Double = -0.2, val swipeEndFrom: Double = -0.1, val swipeStartTo: Double = 1.4, val swipeEndTo: Double = 1.5, val glowRadiusFrom: Dp = 12.8.dp, val glowRadiusTo: Dp = 0.dp, val glowDurationRatio: Double = 1.2, val glowMinDurationMs: Double = 1200.0, val glowEasing: Easing = CssEasing.Ease, val wobbleDurationMs: Double = 1000.0, val wobblePeakTranslateEm: Float = 0.05f, val wobblePeakScaleX: Float = 1.025f, val wobblePeakOffset: Float = 0.125f, val wobbleSettleOffset: Float = 0.75f, val wobbleEasing: Easing = CssEasing.Ease, val wobblePeakEasing: Easing = CssEasing.EaseInOut, val wobbleEndEasing: Easing = CssEasing.EaseOut, val letterWaveRiseEm: Float = -0.05f, val letterWaveSettleEm: Float = -0.02f, val letterWaveEmphasisScale: Float = 1.11f, val letterWaveDurationMs: Double = 900.0, val letterWaveRiseEasing: Easing = CssEasing.EaseInOut, val letterWaveFallEasing: Easing = CssEasing.EaseOut, val instrumentalFillFadeMs: Double = 150.0, val instrumentalFillFrom: Float = 0.78f, val instrumentalFillTo: Float = -0.04f, val instrumentalWaveFrom: Float = 1.2f, val instrumentalWaveTo: Float = 0.0f, val instrumentalWaveEasing: Easing = CssEasing.EaseIn, val instrumentalWaveOscillationMs: Double = 1250.0, val instrumentalWaveOscillationEasing: Easing = CssEasing.EaseInOut, val lyricScrollEasing: Easing = CubicBezierEasing(0.86f, 0f, 0.2f, 1f), val decorationEntryMs: Double = 350.0, val decorationEntryEasing: Easing = CubicBezierEasing(0.25f, 1f, 0.5f, 1f), val timingOffsets: TimingOffsets = TimingOffsets())(source)

How the lyrics look and move. The defaults are upstream's stylesheet; most values stand for one of its --blyrics-* custom properties, and fromCss applies a Better Lyrics theme on top. Times are in milliseconds, sizes in em are shares of fontSize.

Constructors

Link copied to clipboard
constructor(textColor: Color = Color.White, activeOpacity: Float = 1.0f, inactiveOpacity: Float = 0.3f, glowColor: Color = Color.White.copy(alpha = 0.5f), translatedColor: Color = Color.White.copy(alpha = 0.6f), lyricActiveColor: Color? = null, lyricInactiveColor: Color? = null, fontFamily: FontFamily? = null, fontSize: Dp = 48.dp, fontWeight: FontWeight = FontWeight.Bold, lineHeight: Float = 1.333f, rtlFontFamily: FontFamily? = FontFamily.Default, translatedFontFamily: FontFamily? = null, translatedFontSize: Dp = 32.dp, translatedFontWeight: FontWeight = FontWeight.SemiBold, romanizedFontSize: Dp? = null, creditsLabel: String = "Written by", creditsOpacity: Float = 0.2f, creditsFocusedOpacity: Float = 0.85f, linePadding: Dp = 32.dp, scale: Float = 0.95f, activeScale: Float = 1.0f, animations: BraccatoAnimations = BraccatoAnimations(), scaleTransitionMs: Double = 166.0, lineEnterEasing: Easing = CssEasing.Ease, lineExitEasing: Easing = CssEasing.Ease, highlightFadeInMs: Double = 330.0, highlightFadeOutMs: Double = 500.0, highlightFadeInEasing: Easing = CssEasing.Ease, highlightFadeOutEasing: Easing = CssEasing.Ease, swipeEasing: Easing = LinearEasing, swipeEasingName: String = "linear", swipeStartFrom: Double = -0.2, swipeEndFrom: Double = -0.1, swipeStartTo: Double = 1.4, swipeEndTo: Double = 1.5, glowRadiusFrom: Dp = 12.8.dp, glowRadiusTo: Dp = 0.dp, glowDurationRatio: Double = 1.2, glowMinDurationMs: Double = 1200.0, glowEasing: Easing = CssEasing.Ease, wobbleDurationMs: Double = 1000.0, wobblePeakTranslateEm: Float = 0.05f, wobblePeakScaleX: Float = 1.025f, wobblePeakOffset: Float = 0.125f, wobbleSettleOffset: Float = 0.75f, wobbleEasing: Easing = CssEasing.Ease, wobblePeakEasing: Easing = CssEasing.EaseInOut, wobbleEndEasing: Easing = CssEasing.EaseOut, letterWaveRiseEm: Float = -0.05f, letterWaveSettleEm: Float = -0.02f, letterWaveEmphasisScale: Float = 1.11f, letterWaveDurationMs: Double = 900.0, letterWaveRiseEasing: Easing = CssEasing.EaseInOut, letterWaveFallEasing: Easing = CssEasing.EaseOut, instrumentalFillFadeMs: Double = 150.0, instrumentalFillFrom: Float = 0.78f, instrumentalFillTo: Float = -0.04f, instrumentalWaveFrom: Float = 1.2f, instrumentalWaveTo: Float = 0.0f, instrumentalWaveEasing: Easing = CssEasing.EaseIn, instrumentalWaveOscillationMs: Double = 1250.0, instrumentalWaveOscillationEasing: Easing = CssEasing.EaseInOut, lyricScrollEasing: Easing = CubicBezierEasing(0.86f, 0f, 0.2f, 1f), decorationEntryMs: Double = 350.0, decorationEntryEasing: Easing = CubicBezierEasing(0.25f, 1f, 0.5f, 1f), timingOffsets: TimingOffsets = TimingOffsets())

Types

Link copied to clipboard
object Companion

The default theme and the way to a Better Lyrics one.

Properties

Link copied to clipboard
val activeColor: Color

The colour of the line being sung: lyricActiveColor, or textColor at activeOpacity.

Link copied to clipboard

How opaque the line being sung is, against textColor (--blyrics-active-opacity).

Link copied to clipboard

--blyrics-active-scale.

Link copied to clipboard

Which effects run.

Link copied to clipboard

How opaque the credits are once the last line is sung.

Link copied to clipboard

--blyrics-credits-font-size: max(0.4em, 12px).

Link copied to clipboard

What stands before the songwriters' names after the last line.

Link copied to clipboard

How opaque the credits are while the song still runs.

Link copied to clipboard

The easing of a translation or romanization coming in or going.

Link copied to clipboard

How long a translation or romanization takes to come in or go.

Link copied to clipboard
val fontFamily: FontFamily?

The lyrics' font family. Null: the platform's default.

Link copied to clipboard
val fontSize: Dp

--blyrics-font-size: 3rem.

Link copied to clipboard
val fontWeight: FontWeight

The weight of sung lines.

Link copied to clipboard
val glowColor: Color

--blyrics-glow-color, the highlight's drop shadow.

Link copied to clipboard

How long the glow takes to die down, as a multiple of the word's duration.

Link copied to clipboard
val glowEasing: Easing

The easing of the glow dying down.

Link copied to clipboard

The shortest the glow lasts, however short the word.

Link copied to clipboard

The glow's radius as a word starts.

Link copied to clipboard
val glowRadiusTo: Dp

The glow's radius as it has died down.

Link copied to clipboard

The easing of the fade in.

Link copied to clipboard

How long a line synced word takes to fade in.

Link copied to clipboard

The easing of the fade out.

Link copied to clipboard

How long a word's highlight takes to fade out after its line.

Link copied to clipboard
val inactiveColor: Color

The colour of the other lines: lyricInactiveColor, or textColor at inactiveOpacity.

Link copied to clipboard

How opaque the other lines are, against textColor (--blyrics-inactive-opacity).

Link copied to clipboard

How long the instrumental note's fill takes to fade in and out.

Link copied to clipboard

Where the fill's surface starts and ends, as a share of the note's height from the top.

Link copied to clipboard

Where the fill's surface ends, as a share of the note's height from the top.

Link copied to clipboard

The easing of the wave settling.

Link copied to clipboard

The wave on the fill's surface as the break starts, as a multiple of its height.

Link copied to clipboard

The easing of each swing.

Link copied to clipboard

How long one swing of the wave takes.

Link copied to clipboard

The wave on the fill's surface as the break ends.

Link copied to clipboard

How long the wave takes over one letter.

Link copied to clipboard

How large a letter grows as the wave passes it.

Link copied to clipboard

The easing of a letter falling back.

Link copied to clipboard

The easing of a letter rising.

Link copied to clipboard

--blyrics-letter-wave-transform: translateY(-0.05em).

Link copied to clipboard

--blyrics-letter-wave-settle: translateY(-0.02em).

Link copied to clipboard
val lineEnterEasing: Easing

The easing of a line growing as it starts.

Link copied to clipboard
val lineExitEasing: Easing

The easing of a line shrinking as it ends.

Link copied to clipboard

The line height, as a multiple of fontSize.

Link copied to clipboard
val linePadding: Dp

--blyrics-padding, above and below every line.

Link copied to clipboard
val lyricActiveColor: Color?

--blyrics-lyric-active-color: the line being sung, in place of textColor at activeOpacity.

Link copied to clipboard
val lyricInactiveColor: Color?

--blyrics-lyric-inactive-color: the other lines, in place of textColor at inactiveOpacity.

Link copied to clipboard
val lyricScrollEasing: Easing

--blyrics-lyric-scroll-timing-function, which the per-line scroll stagger moves with.

Link copied to clipboard

The romanization's own size. Null: as upstream, the translation's over 1.25. Not upstream.

Link copied to clipboard
val rtlFontFamily: FontFamily?

The family for right-to-left lines (Hebrew, Arabic). The system's by default: a family of the app's own seldom holds those scripts, and the platform's fallback for them comes at regular weight, thin beside the rest. Null keeps fontFamily.

Link copied to clipboard

--blyrics-scale, the size of a line that is not being sung.

Link copied to clipboard

How long a line takes to grow to activeScale and back.

Link copied to clipboard
val swipeEasing: Easing

The easing of the swipe across a word.

Link copied to clipboard

The swipe's easing as the theme wrote it, which the letter wave's planning reads.

Link copied to clipboard

Where the swipe's trailing edge starts, as a share of the word's width.

Link copied to clipboard

Where the swipe's trailing edge ends, as a share of the word's width.

Link copied to clipboard

Where the swipe's leading edge starts, as a share of the word's width.

Link copied to clipboard

Where the swipe's leading edge ends, as a share of the word's width.

Link copied to clipboard

--blyrics-target-scroll-pos-ratio, which upstream reads as a theme setting.

Link copied to clipboard
val textColor: Color

--blyrics-text-color. Lines are drawn in it, the inactive ones at inactiveOpacity.

Link copied to clipboard
val timingOffsets: TimingOffsets

--blyrics-*-timing-offset, in seconds.

Link copied to clipboard
val translatedColor: Color

The colour of translations and romanizations under a line.

Link copied to clipboard
val translatedFontFamily: FontFamily?

The family of translations and romanizations. Null: fontFamily.

Link copied to clipboard

The size of translations.

Link copied to clipboard
val translatedFontWeight: FontWeight

The weight of translations and romanizations.

Link copied to clipboard

How long the nudge of a word group lasts as it starts.

Link copied to clipboard
val wobbleEasing: Easing

The easing into the nudge's peak.

Link copied to clipboard
val wobbleEndEasing: Easing

The easing from the settle to rest.

Link copied to clipboard
val wobblePeakEasing: Easing

The easing from the peak to the settle.

Link copied to clipboard

When the nudge peaks, as a share of its duration.

Link copied to clipboard

How wide the group grows at the nudge's peak.

Link copied to clipboard

Peak of the wobble: translateX(0.05em) scaleX(1.025).

Link copied to clipboard

When the nudge settles, as a share of its duration.

Functions

Link copied to clipboard

This theme with whatever --blyrics-* properties it can read applied.