Expand description
UI-related utilities
Structs§
- Corner
Solver - Solver for arbitrarily deep nested corner radii.
- Format
Distance - Search
Input Width - With
RemSize - An element that sets a particular rem size for its children.
Enums§
Constants§
Functions§
- apca_
contrast - Calculates the perceptual lightness contrast using APCA. Returns a value between approximately -108 and 106. Negative values indicate light text on dark background. Positive values indicate dark text on light background.
- calculate_
contrast_ ratio - Calculates the contrast ratio between two colors according to WCAG 2.0 standards.
- capitalize
- Capitalizes the first character of a string.
- ensure_
minimum_ contrast - Adjusts the foreground color to meet the minimum APCA contrast against the background. The minimum_apca_contrast should be an absolute value (e.g., 75 for Lc 75).
- format_
distance - Get the time difference between two dates into a relative human readable string.
- format_
distance_ from_ now - Get the time difference between a date and now as relative human readable string.
- fuzzy_
matches - Returns
truewhen every character ofqueryappears in order withincandidate(case-insensitive). An empty query matches everything. - fuzzy_
subsequence_ score - Scores a case-insensitive subsequence match. Higher is better.
Returns
Nonewhenqueryis non-empty and not a subsequence ofcandidate. - inner_
corner_ radius - Calculates the child’s content-corner radius for a single nested level.
- is_
light - Returns true if the current theme is light or vibrant light.
- platform_
title_ bar_ height - Returns the platform-appropriate title bar height.
- reveal_
in_ file_ manager_ label - Returns the platform-appropriate label for the “reveal in file manager” action.