A simple and visually appealing Jetpack Compose demo featuring an infinite spinning and color-shifting square. The project showcases modern animation APIs and vibrant HSV color interpolation for a playful, “gamified” effect. Perfect as a splash screen, loading UI, or Compose animation reference.
-
Infinite Smooth Rotation: The square continuously rotates using Compose animation APIs.
-
Dynamic Color Cycling: Color transitions smoothly across the HSV spectrum for a rainbow effect.
-
Minimal, Reusable Composable: Core animation is just a single @Composable function.
-
Material 3 Structure: Clean, up-to-date app structure using Surface and MaterialTheme.
Screen.Recording.2025-09-15.at.9.53.33.AM.mov
- Language: Kotlin
- UI Toolkit: Jetpack Compose
- Animation: Compose Animation Core
- Design System: Material 3 (Compose)
- Clone this repo.
- Open in Android Studio.
- Make sure your build.gradle Compose dependencies align with the latest stable Compose version.
- Build and run on an emulator or device.
- Change the size() for a different square dimension.
- Adjust the animationSpec or color values for speed and feel.
- Embed the SpinningColorfulSquare() inside your own UI or as a loading/splash animation.
This project is licensed under the MIT License — feel free to use, modify, and share!
Inspired by Jetpack Compose’s infiniteTransition and HSV animation possibilities.