PmAqiSeverity

EPA AQI severity categories for PM2.5-derived AQI (0-500), per meshtastic/design#54. Mirrors Co2Severity's ppm→severity pattern, keyed on AQI value instead.

The category name is a string resource (not a hardcoded literal like Co2Severity's) because it is rendered next to the AQI value everywhere the category is shown — the category must never be conveyed by color alone.

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

EPA ends the scale at 500; the range saturates instead of stopping there so an out-of-scale value still reads as the worst category rather than losing its label. aqiFromPm25 already clamps to 500, so this is defensive only.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
val labelRes: StringResource
Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

The category color for the applied theme. Resolved from the surface actually in use rather than isSystemInDarkTheme(), so a user who forces light while the system is dark (or vice versa — AppTheme takes an explicit darkTheme) still gets the tone that was contrast-checked against the surface they are looking at.

Link copied to clipboard
fun colorFor(darkTheme: Boolean): Color

The category color for darkTheme, legible as body text on surface and surfaceVariant in both.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.