Fluent's shadow-opacity model.
A fixed shadow reads as a different elevation depending on what it falls on, so Fluent derives opacity from the surface's luminosity. This is why brand shadows are 30%/25% while neutral shadows are 12%/14%.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
ambientOpacity(
Color surface) → double -
Ambient ("shadow 1") opacity for a shadow cast on
surface, 0–1. -
keyOpacity(
Color surface) → double -
Key ("shadow 2") opacity for a shadow cast on
surface, 0–1. -
luminosity(
Color color) → double -
Weighted luminosity of
color, 0–255. Note this is the non-linearized form the Fluent docs specify — it is not WCAG relative luminance. -
shadowsOn(
Color surface, FluentElevation level) → List< BoxShadow> -
The full shadow pair for an arbitrary
surfacecolor, opacities derived rather than taken from the neutral/brand token pairs.