Docs › Reference
Formula functions
Every function a formula can call. Generated from the launcher's own catalogue.
On this page
Arguments are formulas themselves, so functions nest. Text arguments are quoted with single quotes: format(time_hour, '00').
Like the variables , this table is generated from the app's catalogue and kept in step with it by a test.
Logic#
Name Type What it is
if(condition, then, else)text Picks one of two values. The ? : operator does the same and reads better in short expressions.
Maths#
Name Type What it is
clamp(value, min, max)number Keeps a value inside a range. The workhorse of animation formulas — almost every fade ends in a clamp.
lerp(from, to, fraction)number Blends linearly between two numbers; fraction 0 gives from, 1 gives to.
min(a, b)number The smaller of two numbers.
max(a, b)number The larger of two numbers.
abs(value)number Distance from zero, dropping the sign.
round(value)number Nearest whole number.
floor(value)number Rounds down.
ceil(value)number Rounds up.
mod(a, b)number Remainder of a division. Good for repeating patterns across an index.
pow(base, exponent)number Raises a number to a power.
sqrt(value)number Square root.
exp(value)number e raised to the value. Used for exponential falloff, e.g. the wave in a scrub list.
log(value)number Natural logarithm.
sin(radians)number Sine. Angles are radians, so a full turn is 2 * pi.
cos(radians)number Cosine.
tan(radians)number Tangent.
Text#
Name Type What it is
format(number, '00')text Formats a number with a pattern. format(time_minute, '00') is what turns 7 into "07".
length(text)number Number of characters.
lower(text)text Lowercase.
upper(text)text Uppercase.
trim(text)text Removes leading and trailing whitespace.
contains(text, part)yes/no True when part occurs anywhere in text.
startsWith(text, prefix)yes/no True when the text begins with the prefix.
endsWith(text, suffix)yes/no True when the text ends with the suffix.
Colour#
Name Type What it is
color_mix('#000', '#fff', fraction)colour Blends two colours. Fraction 0 gives the first, 1 the second.
Animation#
Name Type What it is
animate([1, 1.05, 1], 2000, true)number Runs through a list of numbers over a duration in milliseconds; the third argument repeats it. A self-driving value — it changes without anything else changing.
spring(target, stiffness, damping)number Follows a target with spring physics, so a value that jumps arrives softly.
Operators#
Not functions, but part of the same language:
Operator Meaning
+ - * /Arithmetic.
== != < <= > >=Comparison.
&& || !Logic.
? :Conditional, a ? b : c.
??Fall back when the left side is empty.
Documentation for launcher 0.1.0-alpha
· Android 12 and later
· last updated 29 October 2026
← The expression language
Click actions →