In One Sentence: A smarter, nature-driven alternative to macOS Night Shift that dynamically adjusts your screen's color temperature based on real-time solar elevation.
macOS's native "Night Shift" has a fundamental flaw: it is completely rigid. It relies on static sunset times, meaning when the clock strikes a certain hour, your screen abruptly turns yellow like a light switch being flipped.
SolarTint takes a physics-based approach. Sitting quietly in your menu bar, it calculates the exact solar elevation angle at your specific geographic location. By synchronizing your display's color temperature with the actual trajectory of the sun outside your window, it provides a seamless 1:1 match with natural light, protecting your circadian rhythm and reducing eye strain without you even noticing the shift.
- 🌍 True Physical Tracking: Say goodbye to rigid schedules. We use
CoreLocationto fetch your exact coordinates and dynamically calculate the sun's true altitude in the sky. - 📈 Stepless, Seamless Transitions: As the sun sets, your screen's temperature smoothly and linearly drops from a crisp 6500K down to a warm 3500K. The transition is so gradual that the human eye barely detects it happening.
- 🛡️ 100% Offline Algorithm: Powered by local astronomical calculation libraries, SolarTint requires zero network requests. It is incredibly privacy-focused and flawlessly stable (perfect for notoriously unreliable Hackathon Wi-Fi!).
- 🎛️ Hackathon Demo Mode: Features a built-in "Time Travel" debug slider. You can simulate a full day's solar trajectory in 5 seconds, allowing judges to instantly see the dynamic color shifts in action.
Built entirely with native Swift and SwiftUI, the project is divided into four core modules:
- Location Engine: Handles permission requests and precise coordinate fetching.
- Solar Calculator: The astronomical algorithm engine that outputs real-time solar elevation.
- Color Engine: Maps the solar angle (e.g., >30° down to <0°) to target color temperatures (Kelvin).
- Overlay Controller: Utilizes a full-screen transparent window with event passthrough (
ignoresMouseEvents) to achieve smooth color shifts, bypassing private API restrictions for maximum stability.
- Clone the repository:
git clone [Your Repo Link] - Open
SolarTint.xcodeprojin Xcode 15+ - Select your local development Team in Signing & Capabilities
- Build and Run (
Cmd + R) - Crucial: Grant "Location Permissions" on the first launch, then click the 🌞 icon in your menu bar to start the intelligent tinting!
Built in 24 hours by [Your Team Name] at [Hackathon Name].
Future Roadmap: Integration with Weather APIs (warming up the screen earlier on overcast days), ambient light compensation using machine vision, and a "True Color" focus mode tailored for designers.