ChromaFlow brings line-based images to life with a sweeping neon glow that flows across your artwork. A colored light band sweeps continuously over the image, masked precisely to every opaque pixel — so the effect follows the exact shape of lines, edges, and fine details.
Note: ChromaFlow currently supports line-only images with no background (e.g. neon signs, circuit boards, outline illustrations). Support for other image types may be added in future releases.
| Mobile | Wear OS |
|---|---|
![]() |
![]() |
chromaflow-sample— Mobile sample /app— Wear OS sample
- Sweeping glow effect — a colored light band sweeps across the image, visible only on opaque pixels
- Lifecycle-aware — animation automatically pauses when the app goes to background or AOD mode, and resumes on
RESUMED - Highly customizable — glow color, base tint, direction, speed, gradient width, easing, and alpha
- Recomposition-efficient — animation reads only inside the Canvas draw phase, skipping full composition
- Zero dependencies beyond Jetpack Compose
Add JitPack to your project-level settings.gradle.kts:
dependencyResolutionManagement {
repositories {
maven { url = uri("https://jitpack.io") }
}
}Then add the dependency to your module-level build.gradle.kts:
dependencies {
implementation("com.github.M1n9yu23:ChromaFlow:<version>")
}Replace
<version>with the latest release tag.
ChromaFlowImage(
painter = painterResource(R.drawable.my_image),
contentDescription = "Sample image",
style = ChromaFlowStyle(glowColor = Color.Cyan),
modifier = Modifier.fillMaxSize(),
)ChromaFlowImage(
painter = painterResource(R.drawable.my_image),
contentDescription = null,
modifier = Modifier.size(300.dp),
style = ChromaFlowStyle(
glowColor = Color.Cyan,
baseColor = Color.DarkGray,
durationMillis = 1500,
glowAlpha = 0.8f,
gradientWidth = 200.dp,
direction = ChromaFlowDirection.LEFT_TO_RIGHT,
easing = FastOutSlowInEasing,
),
)| Parameter | Type | Default | Description |
|---|---|---|---|
glowColor |
Color |
Color.Unspecified |
Color of the sweeping glow. Unspecified disables animation. |
baseColor |
Color |
Color.Unspecified |
Tint applied over the source image. Unspecified keeps the original. |
durationMillis |
Int |
2500 |
Duration of one sweep pass in milliseconds. |
glowAlpha |
Float |
0.9f |
Peak opacity of the glow at the gradient center (0f–1f). |
gradientWidth |
Dp |
300.dp |
Width of the sweeping gradient band. |
direction |
ChromaFlowDirection |
BIDIRECTIONAL |
Direction of the sweep. |
easing |
Easing |
LinearEasing |
Easing curve applied to each sweep pass. |
| Value | Description |
|---|---|
LEFT_TO_RIGHT |
Sweeps from left edge to right edge, then instantly resets. |
RIGHT_TO_LEFT |
Sweeps from right edge to left edge, then instantly resets. |
BIDIRECTIONAL |
Sweeps left → right → left continuously (default). |
Reference defaults when partially overriding a style:
ChromaFlowStyle(
glowColor = Color.Magenta,
durationMillis = ChromaFlowDefaults.DURATION_MILLIS / 2, // twice as fast
)| Constant | Value |
|---|---|
DURATION_MILLIS |
2500 |
GLOW_ALPHA |
0.9f |
gradientWidth |
300.dp |
direction |
ChromaFlowDirection.BIDIRECTIONAL |
easing |
LinearEasing |
- Android API 24+
- Jetpack Compose
All contributions are welcome — bug fixes, new animation styles, or even expanding support beyond line-based images. If you have a great idea or improvement, feel free to open a pull request or issue.
See CONTRIBUTING.md for details.
If ChromaFlow has been useful to you, consider giving it a ⭐ — it means a lot!
Copyright 2026 Gyugle
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

