You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ColorResolver and SolidColorResolver for androidx.compose.ui.graphics.Color and androidx.compose.ui.graphics.SolidColor, plus ColorStrategy to control color generation mode. All live in dev.appoutlet.some.android.
Scope and constraints
ColorStrategy is a sealed interface extending Strategy with variants: RandomArgb (default), RandomHsl, Palette (with a fixed color list). It lives in dev.appoutlet.some.android.strategy.
ColorResolver generates Color(red, green, blue, alpha) with randomized components when using RandomArgb; uses HSL conversion for RandomHsl; picks from the configured palette for Palette. Constructor receives strategyProvider: StrategyProvider and random: Random. It lives in dev.appoutlet.some.android.resolver.compose.
The resolver fetches the strategy once in init: strategyProvider.get<ColorStrategy>() ?: ColorStrategy.default.
SolidColorResolver creates SolidColor(color) by delegating to the chain to resolve a Color first. Constructor receives random: Random only. It lives in dev.appoutlet.some.android.resolver.compose.
Both canResolve() use exact type matching via typeOf<T>().
Each resolver has its own JVM unit test class. ColorResolver tests verify each strategy variant. SolidColorResolver tests verify it produces a SolidColor wrapping a non-null Color.
Depends on androidx.compose.ui:ui (transitively provides ui-graphics).
In scope: ColorStrategy sealed interface + variants, ColorResolver, SolidColorResolver, JVM unit tests.
Out of scope: registering resolvers in AndroidTypeResolverProvider (ticket #14).
Acceptance criteria
ColorResolver generates colors in default RandomArgb mode
Activity