monet_ui
library
Classes
$QuantizeService$Client
WorkerClient for QuantizeService
AnimatedMonetTheme
Animates solved palette colors with shared-progress interpolation.
Each palette/recipe has one critically damped 0→1 progress spring. A changed
target snapshots the visible colors and restarts progress from rest: position
is continuous, velocity intentionally is not. Frequent retargets may lag the
input more than a momentum-preserving spring, then catch up after it stops.
Contrast-polarity changes fade between solved colors rather than rerunning
the contrast solver on intermediate seeds. Intermediate colors are not
guaranteed to meet either endpoint's contrast requirement.
AnyBackground
Drawing over something you didn't choose: a wallpaper, a video frame, a
gradient, a map.
BoundsCenteredBorder
Applies Compose's path-bounds centering after the fork's unit-space scaling.
Does not resize to fill the path bounds or apply an optical/centroid offset.
Keeps the same transform for fill, stroke, clip, ink and inner paths.
Box
Cam16
CAM16, a color appearance model. Colors are not just defined by their hex
code, but rather, a hex code and viewing conditions.
Cam16ViewingConditions
In traditional color spaces, a color can be identified solely by the
observer's measurement of the color. Color appearance models such as CAM16
also use information about the environment where the color was
observed, known as the viewing conditions.
ChartColors
Chart colors derived from a seed color and a real chart background.
ColorPaletteRecipe
A brand color on a theme-derived, tone-selected, or explicit background.
With an explicit background , backgroundTone optionally identifies the
shared logical context used for polarity. Without it, that concrete surface
forms its own context. Without background , a null tone inherits the theme.
CreateBoxesResult
DisplayMetrics
Derived metrics: the scale factor and logical resolution, plus the
intermediate values for diagnostics.
DisplayModel
Inputs describing a physical display. Call compute to derive
DisplayMetrics .
ExpressiveButton
A stock Flutter button with endpoint-safe content layout.
ExpressiveShapeContent
Content-aware sizing for a surface painted with geometry 's border.
ExpressiveShapeGeometry
A reusable pairing of a border and its precomputed content interiors.
Gamut
Defines the gamut-specific constants that the HCT solver needs.
Hct
HCT, hue, chroma, and tone. A color system that provides a perceptually
accurate color measurement system that can also accurately render what
colors will appear as in different lighting environments.
HctSolver
A class that solves the HCT equation.
ImageToBytesResponse
InterpolatedMonetThemeData
Interpolated theme data that lerps the three palettes while keeping
ThemeData stable by default to avoid Material transient states.
LruCache <K , V >
A fixed-capacity least-recently-used cache.
LstarRange
Represents a range of L* values that produce the same APCA Y value.
MaterialExpressiveBorder
An AndroidX-derived Material 3 Expressive silhouette usable with Material,
ShapeDecoration, InkWell.customBorder, and MonetClip.shape.
MaximizeResult
MonetClip
Clips child to a shape from the nearest Monet theme.
MonetColorScheme
MonetFonts
How monet_ui loads fonts: the one place that sets it
(docs/design/ADR_fonts_in_monet_ui.md in telosnex, D5).
MonetGdtRule20261030
Picks primary, secondary and tertiary the way the wallpaper color brief
asks a person or a vision model to, as code.
MonetGdtRule20261030Option
A measured color option: a merged group of quantizer clusters, shown as
its most chromatic sizable member.
MonetGdtRule20261030Triad
The triad and the options it was chosen from.
MonetPaintColors
One coordinator/ticker per scope. Palette getters discover demand; no role
declaration is required. Bindings own paint subscriptions and release their
observed roles on disposal. Optional role sets prewarm outputs before paint.
Stable inherited scope for MonetPaintColors .
MonetPaletteBinding
A mounted consumer's palette. Getter reads automatically retain outputs;
first use may resolve an endpoint. Subsequent ticks do not resolve endpoints.
Listen to this binding for local repaint invalidation rather than to the bus.
A notification means a retained color may change; RGB is calculated on read.
Dispose when detached or switching buses. Saved values are immutable frames,
not live handles; read value again for each new paint.
MonetShapes
Border factory with a Monet scale already resolved.
MonetShapeTheme
Shape policy stored in Monet theme data.
MonetTheme
MonetThemeCrossfade
Dissolves the previous rendering of child into its new one when data
changes: a raster cross-fade instead of an animated inherited theme.
MonetThemeData
MonetThemeDataTween
Tween between two MonetThemeData instances using a scalar t.
ObservedPalette
Immutable colors with a side-channel for discovering consumer demand.
Equality/hash never call getters or depend on mutable observation state.
The callback should weakly reference its owner: saved frames may outlive it.
Palette
A complete set of contrast-targeted colors derived from a single brand color
and a background tone.
PaletteRecipe
Immutable recipe identity and inputs in one value. Use with bindRecipe rather
than a separate key and closure. Inherited inputs come from the logical theme
endpoint, never its moving frame. Subclasses define which inputs inherit and
must have immutable value equality.
PaletteSnapshot
Complete immutable capture, including every interactive icon role.
Equality/hash use actual outputs and model, never placeholder solver inputs.
PaletteStates
Small prewarm sets for reusable controls, not mandatory declarations.
A first-ever unprepared state starts at the endpoint; preparing its family
before a transition lets hover/pressed states share the existing fade.
PaletteWorkStats
Optional instance-local work diagnostics. Counts requests at the palette
boundary, not iterations/cache misses inside the color-science routines.
PointProvider
PointProviderLab
Quantizer
QuantizerCelebi
QuantizerMap
QuantizerResult
QuantizerWsmeans
QuantizerWu
QuantizeService
QuantizeServiceWorker
Worker for QuantizeService
QuantizeServiceWorkerPool
Worker pool for QuantizeService
RenderMonetThemeCrossfade
Paints child , then the raster of its previous appearance fading out.
ResolvedPalette
A complete immutable output snapshot. Every role must be present.
RolePalette
Palette interface shared by output snapshots and observing views.
Scorer
ScorerTriad
Returns 3 HCTs if result.argbToCount is not empty, otherwise returns an
empty list.
Scrim
A translucent layer that makes content legible over AnyBackground .
Shadows
A Scrim as stacked blurred copies of the glyph; see Scrim.shadows .
ShadowsWithStroke
A Scrim drawn hugging the glyph; see Scrim.shadowsWithStroke .
SharedBorder
One border tone for surfaces drawn together; see
AnyBackground.sharedBorder .
SliceCache
Per-tone cache of the sRGB gamut slice's chromaticity boundary.
SliderFlat
SliderFlatShape
SliderFlatThumb
TemperatureCache
Design utilities using color temperature theory.
ToneRamp
A reusable chart color ramp; see ChartColors.sequential and
ChartColors.divergingWith . Bins and legends should share one ramp so
they agree on colors.
TouchTargets
Physical floor on scale imposed by fingertips rather than eyes.
Constants
blkClmp
→ const double
blkThrs
→ const double
deltaYMin
→ const double
googleFontCategories
→ const List <String >
googleFontLanguages
→ const List <String >
googleFontsDetails
→ const Map <String , Map <String , String > >
googleFontsList
→ const List <String >
inputClampMax
→ const double
inputClampMin
→ const double
kAscentEmByFontFamily
→ const Map <String , double >
Ascent from the font's hhea table, in em. Flutter's line metrics use it.
kColorFontTables
→ const Set <String >
The tables whose glyphs have their own colours.
kDescentEmByFontFamily
→ const Map <String , double >
Descent from the font's hhea table, in em, positive below the baseline.
kFontSizeAdjustExcludedFontFamilies
→ const Set <String >
Families with Latin ink that the size adjust skips: rounding
unitsPerEm / scale would leave the valid range or change the size by
more than 0.1% (docs/design/ADR_font_size_adjust.md in telosnex, D7).
kLatinInkAboveEmByFontFamily
→ const Map <String , double >
How far the Latin letter ink reaches above the baseline, in em: the
largest over every weight and style.
kLatinInkBelowEmByFontFamily
→ const Map <String , double >
How far the Latin letter ink reaches below the baseline, in em, positive
below it. Same families as kLatinInkAboveEmByFontFamily .
kLineHeightClearance
→ const double
Clearance between adjacent lines, as a fraction of the requested size.
kLineHeightFloor
→ const double
Minimum baseline distance, as a fraction of the requested size.
kMonetGdtRule20261030Clusters
→ const int
The QuantizerCelebi cluster count this rule needs.
kMonetGdtRuleV1Colorful
→ const double
kMonetGdtRuleV1HueGap
→ const double
kMonetGdtRuleV1MinDeltaE
→ const double
kMonetGdtRuleV1Plausible
→ const double
kMonetGdtRuleV1Plausible x the role's best probability; colorful at HCT
chroma kMonetGdtRuleV1Colorful ; a distinct hue at
kMonetGdtRuleV1HueGap degrees; S weighs chroma by
kMonetGdtRuleV1SecondaryChromaWeight ; S and T stay kMonetGdtRuleV1MinDeltaE
(CIELAB ΔE76) from earlier picks when they can.
kMonetGdtRuleV1SecondaryChromaWeight
→ const double
kRasterAveragePhraseCharacterAdvanceEmByFontFamily
→ const Map <String , double >
kRasterCapHeightEmByFontFamily
→ const Map <String , double >
kRasterLowercaseP60HeightEmByFontFamily
→ const Map <String , double >
kRasterPhraseHeightEmByFontFamily
→ const Map <String , double >
kRasterUppercaseMedianHeightEmByFontFamily
→ const Map <String , double >
kRasterVisualHeightEmByFontFamily
→ const Map <String , double >
kRasterXHeightEmByFontFamily
→ const Map <String , double >
kReferenceRasterAveragePhraseCharacterAdvanceEm
→ const double
kReferenceRasterCapHeightEm
→ const double
kReferenceRasterLowercaseP60HeightEm
→ const double
kReferenceRasterPhraseHeightEm
→ const double
kReferenceRasterUppercaseMedianHeightEm
→ const double
kReferenceRasterVisualHeightEm
→ const double
kReferenceRasterXHeightEm
→ const double
kReferenceVisualHeightFamily
→ const String
kSrgbToXyz
→ const List <List <double > >
kVisualHeightAdvanceWeight
→ const double
kVisualHeightXWeight
→ const double
kWallpaperColorRoles
→ const List <String >
The roles, in order.
loBoWOffset
→ const double
loClip
→ const double
logicalPixelVisualAngleDegrees
→ const double
Derives a display scale factor (physical pixels per logical pixel) from
physical display geometry and expected viewing distance, instead of
trusting the OS or device manufacturer to report a sane DPI.
loWoBOffset
→ const double
lumaBlue
→ const double
lumaGreen
→ const double
lumaRed
→ const double
mainTrc
→ const double
Calculations for APCA contrast.
Per APCA landing page :
The correct code to use is right here apca-w3 in this satellite repository
Referring to:
https://github.com/Myndex/apca-w3/blob/master/src/apca-w3.js
Variable names and most comments are from the original source.
mainTrcEncode
→ const double
mExp
→ const double
mExpAdj
→ const double
mFactInv
→ const double
mFactor
→ const double
mOffsetIn
→ const double
mOffsetOut
→ const double
normBg
→ const double
normText
→ const double
revBg
→ const double
revText
→ const double
sBco
→ const double
scaleBoW
→ const double
scaleWoB
→ const double
sGco
→ const double
sRco
→ const double
srgbAdaptingLuminance
→ const double
whitePointD65
→ const List <double >
Returns the standard white point, D65. Blue-white of a sunny day.
Functions
$QuantizeServiceInitializer (WorkerRequest $req )
→ WorkerService
Service initializer for QuantizeService
adjustedUnitsPerEm (String fontFamily , int unitsPerEm )
→ int ?
head.unitsPerEm that the size adjust writes for a file of fontFamily
with unitsPerEm, or null if it does not scale the family.
afterimageComplement (Hct input )
→ Hct
The afterimage complement: the color the eye produces after adapting to
input.
alphaFromArgb (int argb )
→ int
Returns the alpha component of a color in ARGB format.
analogous (Hct x , {int count = 5 , double step = 30.0 , HarmonyTonePolicy tonePolicy = HarmonyTonePolicy.preserveTone })
→ List <Hct >
count colors: x flanked by neighbors step degrees apart in chromatic
direction (u'v' angle around the white point). For odd count, x is the
middle element.
apcaContrastOfApcaY (double textApcaY , double backgroundApcaY )
→ double
apcaFromArgbs (int textArgb , int backgroundArgb )
→ double
apcaFromColors ({required Color textColor , required Color backgroundColor })
→ double
apcaInterpolation ({required double percent , required Usage usage })
→ double
apcaYFromArgb (int argb )
→ double
apcaYToGrayscaleArgb (double apcaY , {bool debug = false })
→ int
apcaYToLstarRange (double apcaY , {bool debug = false })
→ LstarRange
Given an APCA Y value, return the range of L* values that could produce it.
argbFromHex (String hex )
→ int ?
argbFromLab (double l , double a , double b )
→ int
Convert a color from La b* to RGB.
argbFromLinrgbComponents (double r , double g , double b )
→ int
argbFromLstar (double lstar )
→ int
Converts an L* value to an ARGB representation.
argbFromRgb (int red , int green , int blue )
→ int
Converts a color from RGB components to ARGB format.
argbFromXyz (double x , double y , double z )
→ int
Converts a color from ARGB to XYZ.
ascentEmForFontFamily (String ? fontFamily )
→ double ?
Ascent from the font's hhea table, in em, when known.
backgroundButtonStyle (Palette sc , {bool showBorder = false , TextStyle ? textStyle , double borderWidth = 2 , OutlinedBorder ? shape , required double scale })
→ ButtonStyle
blueFromArgb (int argb )
→ int
Returns the blue component of a color in ARGB format.
capHeightCentringShift ({required double ascent , required double lineHeight , required double baseline , required double capHeight })
→ double
Distance to move a line down so its capitals are centred in the line.
capHeightShiftForTextStyle (TextStyle style , {required TextScaler textScaler , required double devicePixelRatio , bool mixedCase = false })
→ double
Distance to move one line of style down so its capitals are centred in
its line box, rounded to a device pixel. Negative moves it up.
categoricalChartPalette ({required Color seed , required Brightness brightness , required int count , Color ? background , double contrast = 0.5 , Algo algo = Algo.apca , bool isColorAtIndexStable = true })
→ List <Color >
count categorical series colors; see ChartColors.categorical .
cmapCodePoints (ByteData bytes )
→ Set <int >
Code points that the Unicode cmap subtables map to a glyph other than 0
(.notdef).
colorButtonStyle (Palette sc , {bool showBorder = true , TextStyle ? textStyle , double borderWidth = 2 , OutlinedBorder ? shape , required double scale })
→ ButtonStyle
colorFromHex (String hex )
→ Color ?
colorTables (ByteData bytes )
→ List <String >
The colour tables of bytes, sorted. Empty for a font without them, or a
file that is not a font.
contrastingLstar ({required double withLstar , required Usage usage , Algo by = Algo.apca , required double contrast , bool debug = false , ContrastDirection ? forceDirection })
→ double
contrastingTone ({required int withArgb , required double withTone , required double targetHue , required double targetChroma , required Usage usage , Algo by = Algo.apca , required double contrast , bool debug = false , ContrastDirection ? forceDirection , ColorModel colorModel = ColorModel.kDefault })
→ double
Solve for a tone that achieves usage-level contrast against
a reference surface, using actual ARGB for APCA precision.
contrastRatioInterpolation ({required double percent , required Usage usage })
→ double
contrastRatioOfLstars (double a , double b )
→ double
darkerBackgroundApcaY (double textApcaY , double apca , {bool debug = false })
→ double
darkerBackgroundLstar (double textLstar , double apca , {bool debug = false })
→ double
darkerBackgroundLstarUnsafe (double textLstar , double apca , {bool debug = false })
→ double
Returns the L* of a darker background that achieves apca contrast
with text at textLstar.
darkerLstarUnsafe ({required double lstar , required double contrastRatio })
→ double
darkerTextApcaY (double backgroundApcaY , double apca , {bool debug = false })
→ double
darkerTextLstar (double backgroundYLstar , double apca , {bool debug = false })
→ double
darkerTextLstarUnsafe (double backgroundLstar , double apca , {bool debug = false })
→ double
Returns the L* of a darker text that achieves apca contrast
with background at backgroundLstar.
delinear (double rgbComponent )
→ int
Delinearizes an RGB component.
delinearized (double linearNorm )
→ double
Delinearizes a normalized channel: linear 0,1 → sRGB gamma-encoded 0,1.
descentEmForFontFamily (String ? fontFamily )
→ double ?
Descent from the font's hhea table, in em, when known.
differenceDegrees (double a , double b )
→ double
divergingChartColor ({required Color lowSeed , required Color highSeed , required Brightness brightness , required double t , Color ? background , double contrast = 0.5 , Algo algo = Algo.apca })
→ Color
Diverging chart color at t in 0–1, neutral at exactly 0.5; see
ChartColors.divergingWith .
fillButtonStyle (Palette sc , {bool showBorder = true , TextStyle ? textStyle , double borderWidth = 2 , OutlinedBorder ? shape , required double scale })
→ ButtonStyle
findBoundaryArgbsForApcaY (double apcaY )
→ List <int >
Finds sRGB boundary colors that produce the given apcaY.
findBoundaryArgbsForLuma (double luma )
→ List <int >
fontEmScale (String ? fontFamily )
→ double
The size of the em of fontFamily as it loads, in ems of its file.
fontOutlines (ByteData bytes )
→ FontOutlines
The outline format of bytes: glyf, CFF, or CFF2.
fontTableRecords (ByteData bytes )
→ Map <String , FontTableRecord > ?
The tables of bytes by tag, or null if bytes is not a TrueType or
OpenType file, or its table directory is cut off.
grayscaleArgbFromLuma (double luma )
→ int
greenFromArgb (int argb )
→ int
Returns the green component of a color in ARGB format.
harmony (Hct x , int n , {bool balanced = false , HarmonyTonePolicy tonePolicy = HarmonyTonePolicy.preserveTone })
→ List <Hct >
n colors whose chromatic directions are evenly spaced around the white
point, starting at x. Because the directions cancel, an additive mixture
of the set (at some ratio) is neutral gray: this is the checkable property
behind complement (n=2), triad (n=3), and quad (n=4).
hasLatinLetters (Set <int > codePoints )
→ bool
Whether codePoints has A-Z and a-z: the font draws English letters.
hctFromUv (double tone , double uvHue , double uvChroma , {ColorModel model = ColorModel.kDefault })
→ Hct
Color at tone whose chromaticity sits uvChroma from the white point
in direction uvHue (degrees), clamped to the sRGB gamut.
hexFromArgb (int argb , {bool leadingHashSign = true })
→ String
Converts an ARGB integer to a 6-character RGB hex string.
hexFromColor (Color color , {bool leadingHashSign = true })
→ String
iconButtonStyle (Palette sc , {TextStyle ? textStyle })
→ ButtonStyle
Icon button: transparent background and stateful icon/text colors.
iconSizeFor (TextStyle style )
→ double
Icon size that matches the letters of style in every font: the
requestedFontSize of style.
imageProviderToScaledRgba (ImageProvider <Object > imageProvider , double maxDimension )
→ Future <ByteData >
inBoundsApcaY (double apcaY )
→ double
isFontSizeAdjusted (String ? fontFamily )
→ bool
Whether the size adjust scales fontFamily's bytes.
labFromArgb (int argb )
→ List <double >
Convert a color from ARGB to La b*.
labFromArgbTo (int argb , List <double > out , [int offset = 0 ])
→ void
Convert a color from ARGB to La b* into out at offset.
latinInkForFontFamily (String ? fontFamily )
→ (double , double )?
How far the Latin letter ink of fontFamily reaches (above, below) the
baseline in em, over every weight and style. Null if it is unknown.
lerp (double start , double stop , double amount )
→ double
Linear interpolation between start and stop by amount.
amount between 0 and 1, inclusive.
lighterBackgroundApcaY (double textApcaY , double apca , {bool debug = false })
→ double
lighterBackgroundLstar (double textLstar , double apca , {bool debug = false })
→ double
lighterBackgroundLstarUnsafe (double textLstar , double apca , {bool debug = false })
→ double
Returns the L* of a lighter background that achieves apca contrast
with text at textLstar.
lighterLstarUnsafe ({required double lstar , required double contrastRatio })
→ double
lighterTextApcaY (double backgroundApcaY , double apca , {bool debug = false })
→ double
lighterTextLstar (double backgroundLstar , double apca , {bool debug = false })
→ double
lighterTextLstarUnsafe (double backgroundLstar , double apca , {bool debug = false })
→ double
Returns the L* of a lighter text that achieves apca contrast
with background at backgroundLstar.
linear (int rgbComponent )
→ double
Linearizes an RGB component.
linearized (double srgbNorm )
→ double
Linearizes a normalized channel: sRGB gamma-encoded 0,1 → linear 0,1.
lineHeightForFontFamily (String ? fontFamily , {double clearance = kLineHeightClearance })
→ double ?
TextStyle.height for fontFamily, or null if the font has no data.
lineHeightForTextScaler (TextScaler textScaler , TextStyle style )
→ double
Height of one line of style as laid out: the font size, the text
scale, and the line height the theme sets per font.
loadMonetFont (String fontFamily , ByteData bytes )
→ Future <void >
Loads bytes as fontFamily with the transform of MonetFonts.install ,
as the app loads its fonts. For tests that draw real fonts.
lstarFromArgb (int argb )
→ double
Computes the L* value of a color in ARGB representation.
lstarFromY (double y )
→ double
Converts a Y value to an L* value.
lstarPrefersLighterPair (double lstar )
→ bool
lstarToApcaY (double lstar )
→ double
Converts a CIE L* value to an APCA perceptual luminance (apcaY).
lumaFromArgb (int argb )
→ double
lumaFromLstar (double lstar )
→ double
lumaToLstarRange (double luma , {bool debug = false })
→ List <double >
minimumSizeForScale (double scale )
→ Size
Minimum touch-target size for buttons built from the helpers in this
file, scaled by the user's UI-size ("scale") preference.
monetGdtRule20261030IsColorful (Hct h )
→ bool
Whether a color reads as colorful rather than dull: chroma at least
MonetGdtRule20261030.colorfulChroma , or, where its hue and tone cannot
reach much chroma, at least MonetGdtRule20261030.colorfulFraction of what
they can (never below MonetGdtRule20261030.minChroma ). So a dark red near
its limit counts, and a lavender is not held to a blue's high limit.
monetGdtRule20261030MaxChroma (double hue , double tone )
→ double
The most chroma sRGB can show at hue and tone.
monetGdtRuleV1Triad (List <String > options , List <Map <String , double > > probabilities )
→ List <String > ?
The triad by rule_v1 (blind A/B: beat the vision model's top picks with the
on-device chroma rule 27-11). options in offered order; probabilities
per role in kWallpaperColorRoles order, by hex (missing counts as 0).
The probabilities bound each role to its plausible options; the rule picks:
naturalLineHeightForFontFamily (String ? fontFamily )
→ double ?
The font's own line box (hhea ascent + descent) in em, or null if the
font has no Latin ink data.
normalizeFontFamilyForFontMetrics (String fontFamily )
→ String
opticallyMatchedFontSize ({required double referenceFontSize , required String ? referenceFontFamily , required String ? fontFamily })
→ double
Font size at which fontFamily looks as large as referenceFontFamily
does at referenceFontSize.
outlineButtonStyle (Palette sc , {TextStyle ? textStyle , double borderWidth = 2 , OutlinedBorder ? shape , required double scale })
→ ButtonStyle
Outlined button with transparent background and border.
patchFontAscentDescent (ByteData bytes , double ascentEm , double descentEm , {int ? unitsPerEm })
→ ByteData
bytes with the ascent and descent ascentEm and descentEm, in em,
and no line gap. Returns bytes if it is not a TrueType or OpenType file
with head and hhea tables.
patchFontLineMetrics (ByteData bytes , String fontFamily , {double clearance = kLineHeightClearance })
→ ByteData
bytes with the ascent and descent centred on the font's Latin ink.
rasterAveragePhraseCharacterAdvanceEmForFontFamily (String ? fontFamily )
→ double ?
Average phrase character advance, in em, when known.
rasterCapHeightEmForFontFamily (String ? fontFamily )
→ double ?
Raster cap height for a font family, in em, when known.
rasterVisualHeightEmForFontFamily (String ? fontFamily )
→ double ?
The visual-height metric of the font file, in the em of the file.
rasterVisualHeightScaleForFontFamily (String ? fontFamily )
→ double
Scale that makes the letters of the font file look as large as the
reference font's at the same font size. 1.0 when unknown.
rasterXHeightEmForFontFamily (String ? fontFamily )
→ double ?
Raster x-height for a font family, in em, when known.
redFromArgb (int argb )
→ int
Returns the red component of a color in ARGB format.
requestedFontSize (TextStyle style )
→ double
The font size of style before libmonet's size equalizer scaled it.
rgbaToArgb (int rgba )
→ int
sanitizeDegreesDouble (double degrees )
→ double
Ensures degrees is between 0 and 360.
sanitizeDegreesInt (int degrees )
→ int
Ensures degrees is between 0 and 360.
sequentialChartColor ({required Color seed , required Brightness brightness , required double t , Color ? background , double contrast = 0.5 , Algo algo = Algo.apca })
→ Color
Sequential (low → high) chart color at t in 0–1; see
ChartColors.sequential .
setFontSizeAdjustEnabled (bool enabled )
→ void
Sets fontSizeAdjustEnabled . Only MonetFonts.install calls it.
sharedForegroundDirection ({required double backgroundTone , required double contrast , Algo by = Algo.apca })
→ ContrastDirection
Chooses foreground polarity from context-level inputs only.
signum (double num )
→ int
Returns 1 if num > 0, -1 if num < 0, and 0 if num = 0
snapFontSize (double size )
→ double
Helpers that size and place text from the font tables.
textButtonStyle (Palette sc , {TextStyle ? textStyle , OutlinedBorder ? shape , required double scale })
→ ButtonStyle
Text button with transparent background, no border.
unitsPerEm (ByteData bytes )
→ int ?
head.unitsPerEm of bytes, or null if it has no head table.
uvOfArgb (int argb )
→ (double , double )?
CIE 1976 u'v' chromaticity of argb, or null for degenerate (black).
visualHeightScaleForFontFamily (String ? fontFamily )
→ double
Scale for normal text-theme roles relative to the reference font.
wcagFromArgbs (int a , int b )
→ double
wcagFromColors (Color a , Color b )
→ double
widgetPropertyByState <T > ({required T normal (), required T hover (), required T splash () })
→ WidgetStateProperty <T >
withFontLineHeight (TextStyle style , {required bool fit , required double clearance })
→ TextStyle
style with the line height of its own font family, as createTextTheme
sets it for its text styles (docs/design/ADR_font_line_height.md in
telosnex).
xyzFromArgb (int argb )
→ List <double >
yFromArgb (int argb )
→ double
yFromLstar (double lstar )
→ double
Converts an L* value to a Y value.