Skip to content

feat: Add white and black text color options for digital widgets - #552

Merged
Elektron123 merged 1 commit into
you-apps:mainfrom
violetto-rose:main
Aug 17, 2026
Merged

feat: Add white and black text color options for digital widgets#552
Elektron123 merged 1 commit into
you-apps:mainfrom
violetto-rose:main

Conversation

@violetto-rose

Copy link
Copy Markdown
Contributor

Summary

Adds pure White and Black text color options for both date and time in digital clock widgets (DigitalClockWidget and VerticalClockWidget), giving users high-contrast monochrome choices alongside dynamic Material You theme colors.

Closes #528


Technical Details & Fixes

  1. Direct Colors in TextColor:

    • Added White (Color.WHITE) and Black (Color.BLACK) to TextColor.kt with direct @ColorInt support so static colors are returned directly without needing theme attribute resolution.
  2. Fix for Color.WHITE Application in RemoteViews:

    • Previously, DigitalClockWidget.kt and VerticalClockWidget.kt guarded setTextColor with if (timeColor != -1 && dateColor != -1) because -1 was used as a fallback sentinel when resolving theme attributes.
    • However, in Android ARGB format (32-bit signed int), pure White (0xFFFFFFFF) is literally -1 (Color.WHITE == -1), which caused pure white to be treated as an unresolved attribute and skipped.
    • Removed this check so direct colors (and standard theme attributes) are always applied as expected to the widget views.
  3. Color Picker Contrast & Swatch Outlines:

    • Added subtle borders around color swatches in ClockWidgetConfig.kt so white swatches on light backgrounds and black swatches on dark/AMOLED backgrounds remain easily distinguishable.
    • Used luminance-based checkmark tinting so the selection indicator is always clearly visible on any swatch color.

Verification

  • ./gradlew assembleDebug passed
  • Installed and tested on device (./gradlew installDebug)
  • Verified White, Black, and dynamic theme colors apply correctly across DigitalClockWidget and VerticalClockWidget

@Elektron123
Elektron123 merged commit 979d021 into you-apps:main Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More color options for date & time widget

2 participants