Class BOBElevationPresets
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.Core.dll
Resolves an integer elevation level (0–24) to the Material Design 3 surface-tint percentage
that consuming components apply on top of var(--palette-surface) via color-mix.
The returned percentage is the dark-mode M3 curve (0/5/8/11/12/14, plateau-14% from
level 5 onwards). In light mode, components either gate the consumption of
--bob-inline-elevation-tint behind [data-bob-theme="dark"] selectors, or accept
that color-mix(... 0%) with the same value visually approximates light-mode behaviour
(no perceptible tint at low levels).
The tint color is decided by the CSS layer
(default: var(--palette-surface-contrast)); this class owns only the amount.
public static class BOBElevationPresets
- Inheritance
-
objectBOBElevationPresets
Methods
SurfaceTintPercent(int)
Material Design 3 surface-tint percentage for the given elevation level.
0→ 0%1→ 5%2→ 8%3→ 11%4→ 12%5..24→ 14% (plateau)
0..24 are clamped.
public static int SurfaceTintPercent(int level)
Parameters
levelint
Returns
- int