├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── config.yml │ └── feature_request.yaml ├── resources │ ├── banner.png │ ├── bmc-button.png │ └── features.png └── workflows │ ├── crowdin.yml │ ├── crowdin_download.yml │ ├── crowdin_upload.yml │ └── fetch_contributors.yml ├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro ├── schemas │ └── com.drdisagree.colorblendr.data.database.AppDatabase │ │ └── 1.json └── src │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ └── com │ │ └── drdisagree │ │ └── colorblendr │ │ ├── extension │ │ └── MethodInterface.aidl │ │ ├── service │ │ ├── IRootConnection.aidl │ │ └── IShizukuConnection.aidl │ │ └── utils │ │ └── fabricated │ │ └── FabricatedOverlayResource.aidl │ ├── assets │ ├── contributors.json │ └── translators.json │ ├── ic_launcher-playstore.png │ ├── java │ ├── com │ │ └── drdisagree │ │ │ └── colorblendr │ │ │ ├── ColorBlendr.kt │ │ │ ├── data │ │ │ ├── common │ │ │ │ ├── Constant.kt │ │ │ │ └── Utilities.kt │ │ │ ├── config │ │ │ │ └── Prefs.kt │ │ │ ├── dao │ │ │ │ └── CustomStyleDao.kt │ │ │ ├── database │ │ │ │ ├── AppDatabase.kt │ │ │ │ └── Converters.kt │ │ │ ├── enums │ │ │ │ ├── AppType.kt │ │ │ │ ├── MonetStyle.kt │ │ │ │ └── WorkMethod.kt │ │ │ ├── models │ │ │ │ ├── AboutAppModel.kt │ │ │ │ ├── AppInfoModel.kt │ │ │ │ ├── CustomStyleModel.kt │ │ │ │ └── StyleModel.kt │ │ │ └── repository │ │ │ │ └── CustomStyleRepository.kt │ │ │ ├── extension │ │ │ └── ThemeOverlayPackage.kt │ │ │ ├── provider │ │ │ ├── RemotePrefProvider.kt │ │ │ ├── RootConnectionProvider.kt │ │ │ └── ShizukuConnectionProvider.kt │ │ │ ├── service │ │ │ ├── AutoStartService.kt │ │ │ ├── BroadcastListener.kt │ │ │ ├── RestartBroadcastReceiver.kt │ │ │ ├── RootConnection.kt │ │ │ ├── ScheduledJobService.kt │ │ │ ├── ServiceLauncher.kt │ │ │ └── ShizukuConnection.kt │ │ │ ├── ui │ │ │ ├── activities │ │ │ │ ├── MainActivity.kt │ │ │ │ └── SplashActivity.kt │ │ │ ├── adapters │ │ │ │ ├── AboutAppAdapter.kt │ │ │ │ ├── AppListAdapter.kt │ │ │ │ ├── FragmentAdapter.kt │ │ │ │ ├── OnboardingAdapter.kt │ │ │ │ └── StylePreviewAdapter.kt │ │ │ ├── fragments │ │ │ │ ├── AboutFragment.kt │ │ │ │ ├── ColorPaletteFragment.kt │ │ │ │ ├── ColorsFragment.kt │ │ │ │ ├── HomeFragment.kt │ │ │ │ ├── PerAppThemeFragment.kt │ │ │ │ ├── SettingsAdvancedFragment.kt │ │ │ │ ├── SettingsFragment.kt │ │ │ │ ├── StylesFragment.kt │ │ │ │ ├── ThemeFragment.kt │ │ │ │ └── onboarding │ │ │ │ │ ├── OnboardingFragment.kt │ │ │ │ │ └── pages │ │ │ │ │ ├── OnboardingItem1Fragment.kt │ │ │ │ │ ├── OnboardingItem2Fragment.kt │ │ │ │ │ ├── OnboardingItem3Fragment.kt │ │ │ │ │ └── OnboardingItem4Fragment.kt │ │ │ ├── viewmodels │ │ │ │ └── SharedViewModel.kt │ │ │ ├── views │ │ │ │ ├── ColorPreview.kt │ │ │ │ ├── ResizableSeekbar.kt │ │ │ │ ├── RoundedMaterialButtonToggleGroup.kt │ │ │ │ └── WallColorPreview.kt │ │ │ └── widgets │ │ │ │ ├── ColorPickerWidget.kt │ │ │ │ ├── MenuWidget.kt │ │ │ │ ├── SeekbarWidget.kt │ │ │ │ ├── SelectableViewWidget.kt │ │ │ │ ├── StylePreviewWidget.kt │ │ │ │ └── SwitchWidget.kt │ │ │ └── utils │ │ │ ├── annotations │ │ │ └── Test.kt │ │ │ ├── app │ │ │ ├── AppUtil.kt │ │ │ ├── BackupRestore.kt │ │ │ ├── FragmentUtil.kt │ │ │ ├── MiscUtil.kt │ │ │ ├── ParserUtils.kt │ │ │ └── SystemUtil.kt │ │ │ ├── cam │ │ │ ├── Cam.java │ │ │ ├── CamUtils.java │ │ │ ├── Frame.java │ │ │ └── HctSolver.java │ │ │ ├── colors │ │ │ ├── ColorMapUtil.kt │ │ │ ├── ColorModifiers.kt │ │ │ ├── ColorSchemeUtil.kt │ │ │ ├── ColorUtil.kt │ │ │ ├── DynamicColors.kt │ │ │ └── PerPackageColors.kt │ │ │ ├── fabricated │ │ │ ├── FabricatedOverlayEntry.kt │ │ │ ├── FabricatedOverlayResource.kt │ │ │ └── FabricatedUtil.kt │ │ │ ├── manager │ │ │ └── OverlayManager.kt │ │ │ ├── monet │ │ │ ├── LICENSE │ │ │ ├── blend │ │ │ │ └── Blend.java │ │ │ ├── contrast │ │ │ │ └── Contrast.java │ │ │ ├── dislike │ │ │ │ └── DislikeAnalyzer.java │ │ │ ├── dynamiccolor │ │ │ │ ├── ContrastCurve.java │ │ │ │ ├── DynamicColor.java │ │ │ │ ├── DynamicScheme.java │ │ │ │ ├── MaterialDynamicColors.java │ │ │ │ ├── ToneDeltaPair.java │ │ │ │ ├── TonePolarity.java │ │ │ │ └── Variant.java │ │ │ ├── hct │ │ │ │ ├── Cam16.java │ │ │ │ ├── Hct.java │ │ │ │ ├── HctSolver.java │ │ │ │ └── ViewingConditions.java │ │ │ ├── palettes │ │ │ │ ├── CorePalette.java │ │ │ │ └── TonalPalette.java │ │ │ ├── quantize │ │ │ │ ├── PointProvider.java │ │ │ │ ├── PointProviderLab.java │ │ │ │ ├── Quantizer.java │ │ │ │ ├── QuantizerCelebi.java │ │ │ │ ├── QuantizerMap.java │ │ │ │ ├── QuantizerResult.java │ │ │ │ ├── QuantizerWsmeans.java │ │ │ │ └── QuantizerWu.java │ │ │ ├── scheme │ │ │ │ ├── Scheme.java │ │ │ │ ├── SchemeContent.java │ │ │ │ ├── SchemeExpressive.java │ │ │ │ ├── SchemeFidelity.java │ │ │ │ ├── SchemeFruitSalad.java │ │ │ │ ├── SchemeMonochrome.java │ │ │ │ ├── SchemeNeutral.java │ │ │ │ ├── SchemeRainbow.java │ │ │ │ ├── SchemeTonalSpot.java │ │ │ │ └── SchemeVibrant.java │ │ │ ├── score │ │ │ │ └── Score.java │ │ │ ├── temperature │ │ │ │ └── TemperatureCache.java │ │ │ └── utils │ │ │ │ ├── ColorUtils.java │ │ │ │ ├── MathUtils.java │ │ │ │ └── StringUtils.java │ │ │ ├── shizuku │ │ │ └── ShizukuUtil.kt │ │ │ └── wallpaper │ │ │ └── WallpaperColorUtil.kt │ └── me │ │ └── jfenn │ │ └── colorpickerdialog │ │ ├── LICENSE │ │ ├── adapters │ │ ├── ColorPickerPagerAdapter.java │ │ ├── HeightablePagerAdapter.java │ │ ├── ImagePickerAdapter.java │ │ └── PresetColorAdapter.java │ │ ├── dialogs │ │ ├── ColorPickerDialog.java │ │ ├── ImageColorPickerDialog.java │ │ └── PickerDialog.java │ │ ├── interfaces │ │ ├── ActivityRequestHandler.java │ │ ├── ActivityResultHandler.java │ │ ├── OnColorPickedListener.java │ │ └── PickerTheme.java │ │ ├── utils │ │ ├── AlphaColorDrawable.java │ │ ├── ArrayUtils.java │ │ ├── ColorUtils.java │ │ └── DelayedInstantiation.java │ │ └── views │ │ ├── CircleImageView.java │ │ ├── HeightableViewPager.java │ │ ├── RoundedSquareImageView.java │ │ ├── SelectableCircleColorView.java │ │ ├── color │ │ ├── HorizontalSmoothColorView.java │ │ ├── OrientationDiffListener.java │ │ ├── SmoothColorView.java │ │ └── VerticalSmoothColorView.java │ │ └── picker │ │ ├── HSVPickerView.java │ │ ├── ImageColorPickerView.java │ │ ├── ImagePickerView.java │ │ ├── PickerView.java │ │ ├── PresetPickerView.java │ │ └── RGBPickerView.java │ └── res │ ├── anim │ ├── fade_in.xml │ ├── fade_out.xml │ ├── slide_in_left.xml │ ├── slide_in_right.xml │ ├── slide_out_left.xml │ └── slide_out_right.xml │ ├── color │ ├── color_searchbar_background.xml │ ├── color_seekbar_progress.xml │ └── color_seekbar_progress_disabled.xml │ ├── drawable │ ├── bg_container_bottom.xml │ ├── bg_container_mid.xml │ ├── bg_container_top.xml │ ├── bg_icon_rounded.xml │ ├── bg_searchbox.xml │ ├── bg_searchbox_transparent.xml │ ├── buymeacoffee_bg.png │ ├── buymeacoffee_fg.png │ ├── color_table_square.xml │ ├── divider_credits_item.xml │ ├── divider_toggle_button.xml │ ├── ic_add.xml │ ├── ic_add_a_photo.xml │ ├── ic_android.xml │ ├── ic_app_widgets.xml │ ├── ic_arrow_end.xml │ ├── ic_attach_file.xml │ ├── ic_backup.xml │ ├── ic_battery_landscape_bg.xml │ ├── ic_battery_landscape_fg.xml │ ├── ic_branding_image.xml │ ├── ic_brush.xml │ ├── ic_checked_filled.xml │ ├── ic_checked_outline.xml │ ├── ic_clear.xml │ ├── ic_close.xml │ ├── ic_color_fill.xml │ ├── ic_color_picker.xml │ ├── ic_dark_icon.xml │ ├── ic_extension.xml │ ├── ic_filter_list.xml │ ├── ic_github.xml │ ├── ic_github_scaled.xml │ ├── ic_help.xml │ ├── ic_help_scaled.xml │ ├── ic_info.xml │ ├── ic_invert_colors.xml │ ├── ic_launcher_background.xml │ ├── ic_launcher_foreground.xml │ ├── ic_launcher_notification.xml │ ├── ic_light_dark.xml │ ├── ic_nav_colors.xml │ ├── ic_nav_colors_filled.xml │ ├── ic_nav_colors_outline.xml │ ├── ic_nav_settings.xml │ ├── ic_nav_settings_filled.xml │ ├── ic_nav_settings_outline.xml │ ├── ic_nav_styles.xml │ ├── ic_nav_styles_filled.xml │ ├── ic_nav_styles_outline.xml │ ├── ic_nav_theme.xml │ ├── ic_nav_theme_filled.xml │ ├── ic_nav_theme_outline.xml │ ├── ic_news.xml │ ├── ic_news_scaled.xml │ ├── ic_onboarding_img.xml │ ├── ic_paint.xml │ ├── ic_reset.xml │ ├── ic_restore.xml │ ├── ic_search.xml │ ├── ic_semi_transparent.xml │ ├── ic_service.xml │ ├── ic_settings_starry.xml │ ├── ic_table_view.xml │ ├── ic_text.xml │ ├── ic_update.xml │ ├── ic_user_account.xml │ ├── img_drdisagree.png │ ├── preview_color_picker.xml │ └── seekbar_track.xml │ ├── layout-land │ ├── colorpicker_dialog_color_picker.xml │ ├── fragment_onboarding_item1.xml │ ├── fragment_onboarding_item2.xml │ ├── fragment_onboarding_item3.xml │ └── fragment_onboarding_item4.xml │ ├── layout │ ├── activity_main.xml │ ├── colorpicker_dialog_color_picker.xml │ ├── colorpicker_dialog_image_color_picker.xml │ ├── colorpicker_item_color.xml │ ├── colorpicker_item_image.xml │ ├── colorpicker_item_image_select.xml │ ├── colorpicker_layout_hsv_picker.xml │ ├── colorpicker_layout_image_picker.xml │ ├── colorpicker_layout_preset_picker.xml │ ├── colorpicker_layout_rgb_picker.xml │ ├── fragment_about.xml │ ├── fragment_color_palette.xml │ ├── fragment_colors.xml │ ├── fragment_home.xml │ ├── fragment_onboarding.xml │ ├── fragment_onboarding_item1.xml │ ├── fragment_onboarding_item2.xml │ ├── fragment_onboarding_item3.xml │ ├── fragment_onboarding_item4.xml │ ├── fragment_per_app_theme.xml │ ├── fragment_settings.xml │ ├── fragment_settings_advanced.xml │ ├── fragment_styles.xml │ ├── fragment_theme.xml │ ├── item_style_preview.xml │ ├── view_about_app.xml │ ├── view_about_app_credits_header.xml │ ├── view_about_app_credits_item.xml │ ├── view_app_list.xml │ ├── view_backup_restore.xml │ ├── view_color_palette_warn.xml │ ├── view_color_table.xml │ ├── view_per_app_warn.xml │ ├── view_searchbar.xml │ ├── view_text_field_outlined.xml │ ├── view_toolbar.xml │ ├── view_wallpaper_color.xml │ ├── view_widget_colorpicker.xml │ ├── view_widget_menu.xml │ ├── view_widget_seekbar.xml │ ├── view_widget_selectable.xml │ ├── view_widget_style_preview.xml │ └── view_widget_switch.xml │ ├── menu │ ├── bottom_nav_menu.xml │ ├── custom_style_menu.xml │ └── settings_menu.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.webp │ ├── ic_launcher_background.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-mdpi │ ├── ic_launcher.webp │ ├── ic_launcher_background.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-xhdpi │ ├── ic_launcher.webp │ ├── ic_launcher_background.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-xxhdpi │ ├── ic_launcher.webp │ ├── ic_launcher_background.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-xxxhdpi │ ├── ic_launcher.webp │ ├── ic_launcher_background.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── values-af-rZA │ └── strings.xml │ ├── values-ar-rSA │ └── strings.xml │ ├── values-bn-rBD │ └── strings.xml │ ├── values-ca-rES │ └── strings.xml │ ├── values-cs-rCZ │ └── strings.xml │ ├── values-da-rDK │ └── strings.xml │ ├── values-de-rDE │ └── strings.xml │ ├── values-el-rGR │ └── strings.xml │ ├── values-es-rES │ └── strings.xml │ ├── values-fi-rFI │ └── strings.xml │ ├── values-fr-rFR │ └── strings.xml │ ├── values-hi-rIN │ └── strings.xml │ ├── values-hu-rHU │ └── strings.xml │ ├── values-it-rIT │ └── strings.xml │ ├── values-iw-rIL │ └── strings.xml │ ├── values-ja-rJP │ └── strings.xml │ ├── values-ko-rKR │ └── strings.xml │ ├── values-night-v31 │ └── colors.xml │ ├── values-night-v32 │ └── colors.xml │ ├── values-night-v33 │ └── colors.xml │ ├── values-night │ ├── colors.xml │ ├── ic_launcher_background.xml │ └── themes.xml │ ├── values-nl-rNL │ └── strings.xml │ ├── values-no-rNO │ └── strings.xml │ ├── values-pl-rPL │ └── strings.xml │ ├── values-pt-rBR │ └── strings.xml │ ├── values-pt-rPT │ └── strings.xml │ ├── values-ro-rRO │ └── strings.xml │ ├── values-ru-rRU │ └── strings.xml │ ├── values-sr-rSP │ └── strings.xml │ ├── values-sv-rSE │ └── strings.xml │ ├── values-tr-rTR │ └── strings.xml │ ├── values-uk-rUA │ └── strings.xml │ ├── values-v31 │ └── colors.xml │ ├── values-v32 │ └── colors.xml │ ├── values-v33 │ ├── colors.xml │ └── styles.xml │ ├── values-vi-rVN │ └── strings.xml │ ├── values-zh-rCN │ └── strings.xml │ ├── values-zh-rTW │ └── strings.xml │ ├── values │ ├── arrays.xml │ ├── attrs.xml │ ├── colors.xml │ ├── dimens.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ ├── styles.xml │ └── themes.xml │ └── xml │ ├── backup_rules.xml │ └── data_extraction_rules.xml ├── build.gradle.kts ├── crowdin.yml ├── docs ├── contributors.md └── translators.md ├── fastlane └── metadata │ └── android │ ├── en-US │ ├── changelogs │ │ ├── 1.txt │ │ ├── 10.txt │ │ ├── 11.txt │ │ ├── 12.txt │ │ ├── 13.txt │ │ ├── 14.txt │ │ ├── 15.txt │ │ ├── 16.txt │ │ ├── 17.txt │ │ ├── 18.txt │ │ ├── 19.txt │ │ ├── 2.txt │ │ ├── 20.txt │ │ ├── 21.txt │ │ ├── 22.txt │ │ ├── 23.txt │ │ ├── 24.txt │ │ ├── 25.txt │ │ ├── 26.txt │ │ ├── 3.txt │ │ ├── 4.txt │ │ ├── 5.txt │ │ ├── 6.txt │ │ ├── 7.txt │ │ ├── 8.txt │ │ └── 9.txt │ ├── full_description.txt │ ├── images │ │ ├── featureGraphic.png │ │ ├── icon.png │ │ └── phoneScreenshots │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ └── 4.png │ ├── short_description.txt │ └── title.txt │ └── ru │ ├── full_description.txt │ └── short_description.txt ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts └── systemstubs ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml ├── aidl └── android │ ├── app │ ├── IActivityManager.aidl │ └── IProcessObserver.aidl │ ├── content │ ├── om │ │ ├── IOverlayManager.aidl │ │ ├── OverlayIdentifier.aidl │ │ ├── OverlayInfo.aidl │ │ └── OverlayManagerTransaction.aidl │ └── pm │ │ └── UserInfo.aidl │ └── os │ ├── IUserManager.aidl │ └── UserHandle.aidl └── java └── android ├── app └── ProfilerInfo.java ├── content ├── om │ ├── CriticalOverlayInfo.java │ ├── FabricatedOverlay.java │ ├── OverlayIdentifier.java │ ├── OverlayInfo.java │ └── OverlayManagerTransaction.java └── pm │ └── UserInfo.java └── os └── UserHandle.java /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://buymeacoffee.com/drdisagree'] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: GitHub Discussions 4 | url: https://github.com/Mahmud0808/ColorBlendr/discussions 5 | about: Discuss anything related to ColorBlendr, or ask and answer questions here. 6 | - name: Telegram Channel 7 | url: https://t.me/DrDsProjects 8 | about: Follow telegram channel to get latest news and updates. 9 | - name: Telegram Group 10 | url: https://t.me/DrDsProjectsChat 11 | about: We recommend to go to this place if you wish to ask a question and want a quicker reply. 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yaml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest features you want the developers (or contributors) to make for the app. 3 | title: "[FEATURE] Your feature request title here" 4 | labels: [ feature, enhancement ] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to file this issue! Here are a few things to check before clicking the submit button :) 10 | 1. Make sure you're on the latest version of the app. The current release can be found here: https://github.com/Mahmud0808/ColorBlendr/releases/latest 11 | 2. Search through **both** [open and closed issues](https://github.com/Mahmud0808/ColorBlendr/issues?q=is%3Aissue%20sort%3Aupdated-desc) for your feature request. 12 | 3. **ALWAYS** fill this template. If you fail to do so, your issue will be immediately closed with no response. Maintaining open source projects for free is hard work, and we expect users to respect that time and effort by putting in a little bit of their own. That helps us implement your feature faster and in return you get a better app — everybody wins. 13 | 14 | Please keep in mind that we may not always implement this feature request. Alongside that, if this issue is inactive for 90 days, it'll be marked as stale. 15 | 16 | - type: textarea 17 | id: feature-description 18 | attributes: 19 | label: Describe the feature 20 | description: A clear and concise description of what the feature is. 21 | validations: 22 | required: true 23 | 24 | - type: textarea 25 | id: feature-usefulness 26 | attributes: 27 | label: Why would it be useful to add? 28 | description: Explain why this feature would be useful to you. 29 | validations: 30 | required: true 31 | 32 | - type: textarea 33 | id: feature-examples 34 | attributes: 35 | label: Example(s) 36 | description: Post screenshots/drawings/links/etc of the feature request, or proof-of-concept images about the feature. 37 | validations: 38 | required: true 39 | 40 | - type: textarea 41 | id: additional-context 42 | attributes: 43 | label: Additional context 44 | description: Add any other context about the feature here. 45 | validations: 46 | required: false 47 | -------------------------------------------------------------------------------- /.github/resources/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/.github/resources/banner.png -------------------------------------------------------------------------------- /.github/resources/bmc-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/.github/resources/bmc-button.png -------------------------------------------------------------------------------- /.github/resources/features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/.github/resources/features.png -------------------------------------------------------------------------------- /.github/workflows/crowdin.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Synchronization 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | permissions: 7 | contents: write 8 | pull-requests: write 9 | 10 | jobs: 11 | 12 | synchronize-with-crowdin: 13 | name: Synchronize with Crowdin 14 | if: github.repository_owner == 'Mahmud0808' 15 | runs-on: ubuntu-latest 16 | steps: 17 | 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | 21 | - name: Sync Translations 22 | uses: crowdin/github-action@v2 23 | with: 24 | upload_translations: false 25 | upload_sources: true 26 | download_translations: true 27 | localization_branch_name: localization 28 | create_pull_request: true 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 31 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 32 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/crowdin_download.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Download 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * 0' 6 | workflow_dispatch: 7 | 8 | permissions: 9 | contents: write 10 | pull-requests: write 11 | 12 | jobs: 13 | 14 | synchronize-with-crowdin: 15 | name: Download translations from Crowdin 16 | if: github.repository_owner == 'Mahmud0808' 17 | runs-on: ubuntu-latest 18 | steps: 19 | 20 | - name: Checkout 21 | uses: actions/checkout@v4 22 | 23 | - name: Generate translators table 24 | id: "translators" 25 | uses: andrii-bodnar/action-crowdin-contributors@v2 26 | with: 27 | contributors_per_line: 6 28 | max_contributors: 500 29 | image_size: 32 30 | min_words_contributed: 1 31 | files: ./docs/translators.md 32 | crowdin_project_link: 'https://crowdin.com/project/ColorBlendr' 33 | env: 34 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 35 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 36 | 37 | - name: Save translators in assets 38 | run: 39 | printf '%s\n' '${{ steps.translators.outputs.json_report }}' > ./app/src/main/assets/translators.json 40 | 41 | - name: Download translations 42 | uses: crowdin/github-action@v2 43 | with: 44 | upload_translations: false 45 | upload_sources: false 46 | download_translations: true 47 | localization_branch_name: localization 48 | create_pull_request: true 49 | env: 50 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 51 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 52 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/crowdin_upload.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Upload 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | paths: 7 | - 'app/src/main/res/values/strings.xml' 8 | workflow_dispatch: 9 | 10 | jobs: 11 | synchronize-with-crowdin: 12 | name: Upload source to Crowdin 13 | if: github.repository_owner == 'Mahmud0808' 14 | runs-on: ubuntu-latest 15 | steps: 16 | 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | 20 | - name: Upload Strings 21 | uses: crowdin/github-action@v2 22 | with: 23 | upload_translations: false 24 | upload_sources: true 25 | download_translations: false 26 | localization_branch_name: localization 27 | create_pull_request: false 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 30 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 31 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 32 | -------------------------------------------------------------------------------- /.github/workflows/fetch_contributors.yml: -------------------------------------------------------------------------------- 1 | name: Fetch Contributors 2 | 3 | on: 4 | workflow_dispatch: # This will run the workflow on manual trigger 5 | 6 | permissions: 7 | contents: write 8 | 9 | jobs: 10 | contrib-readme-job: 11 | name: Fetch and update contributors list 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v4 17 | 18 | - name: Fetch contributors list 19 | uses: akhilmhdh/contributors-readme-action@v2.3.10 20 | with: 21 | image_size: 100 22 | readme_path: "docs/contributors.md" 23 | collaborators: all 24 | columns_per_row: 6 25 | commit_message: "Update contributors.md" 26 | committer_username: "Mahmud0808" 27 | committer_email: "crazymahmud08@gmail.com" 28 | pr_title_on_protected: "Update contributors list" 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | 32 | - name: Save contributors in assets 33 | if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true 34 | run: | 35 | printf '%s\n' $(curl "https://api.github.com/repos/Mahmud0808/ColorBlendr/contributors") > ./app/src/main/assets/contributors.json 36 | 37 | - name: Commit changes and push 38 | uses: github-actions-x/commit@v2.9 39 | with: 40 | github-token: ${{ secrets.GITHUB_TOKEN }} 41 | push-branch: 'master' 42 | commit-message: 'ci: update contributors.json' 43 | force-add: 'true' 44 | files: app/src/main/assets/contributors.json 45 | name: Mahmud0808 46 | email: crazymahmud08@gmail.com 47 | rebase: 'true' 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | .idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | local.properties 11 | *.apk 12 | *.jks 13 | /app/debug/ 14 | /app/release/ 15 | /*.hprof 16 | /.idea 17 | /.kotlin/sessions/*.salive 18 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Kotlin 2 | -assumenosideeffects class kotlin.jvm.internal.Intrinsics { 3 | public static void check*(...); 4 | public static void throw*(...); 5 | } 6 | -assumenosideeffects class java.util.Objects { 7 | public static ** requireNonNull(...); 8 | } 9 | 10 | # Strip debug log 11 | -assumenosideeffects class android.util.Log { 12 | public static int v(...); 13 | public static int d(...); 14 | } 15 | 16 | # Obfuscation 17 | -repackageclasses 18 | -allowaccessmodification 19 | 20 | # AIDL 21 | -keep,allowoptimization,allowobfuscation class com.drdisagree.colorblendr.service.IRootConnection { *; } 22 | -keep,allowoptimization,allowobfuscation class com.drdisagree.colorblendr.service.IShizukuConnection { *; } 23 | -keep,allowoptimization,allowobfuscation class com.drdisagree.colorblendr.utils.fabricated.FabricatedOverlayResource { *; } 24 | 25 | # Gson 26 | -keepattributes Signature 27 | -keep class com.google.gson.reflect.TypeToken { *; } 28 | -keep class * extends com.google.gson.reflect.TypeToken 29 | 30 | # Color picker 31 | -keep,allowoptimization,allowobfuscation class me.jfenn.colorpickerdialog.** { *; } -------------------------------------------------------------------------------- /app/schemas/com.drdisagree.colorblendr.data.database.AppDatabase/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "formatVersion": 1, 3 | "database": { 4 | "version": 1, 5 | "identityHash": "ebcb729a0a5962f2d0018caf4b5c79c6", 6 | "entities": [ 7 | { 8 | "tableName": "custom_style_table", 9 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`styleId` TEXT NOT NULL, `styleName` TEXT NOT NULL, `description` TEXT NOT NULL, `prefsGson` TEXT NOT NULL, `monet` TEXT NOT NULL, `palette` TEXT NOT NULL, PRIMARY KEY(`styleId`))", 10 | "fields": [ 11 | { 12 | "fieldPath": "styleId", 13 | "columnName": "styleId", 14 | "affinity": "TEXT", 15 | "notNull": true 16 | }, 17 | { 18 | "fieldPath": "styleName", 19 | "columnName": "styleName", 20 | "affinity": "TEXT", 21 | "notNull": true 22 | }, 23 | { 24 | "fieldPath": "description", 25 | "columnName": "description", 26 | "affinity": "TEXT", 27 | "notNull": true 28 | }, 29 | { 30 | "fieldPath": "prefsGson", 31 | "columnName": "prefsGson", 32 | "affinity": "TEXT", 33 | "notNull": true 34 | }, 35 | { 36 | "fieldPath": "monet", 37 | "columnName": "monet", 38 | "affinity": "TEXT", 39 | "notNull": true 40 | }, 41 | { 42 | "fieldPath": "palette", 43 | "columnName": "palette", 44 | "affinity": "TEXT", 45 | "notNull": true 46 | } 47 | ], 48 | "primaryKey": { 49 | "autoGenerate": false, 50 | "columnNames": [ 51 | "styleId" 52 | ] 53 | }, 54 | "indices": [], 55 | "foreignKeys": [] 56 | } 57 | ], 58 | "views": [], 59 | "setupQueries": [ 60 | "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 61 | "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'ebcb729a0a5962f2d0018caf4b5c79c6')" 62 | ] 63 | } 64 | } -------------------------------------------------------------------------------- /app/src/main/aidl/com/drdisagree/colorblendr/extension/MethodInterface.aidl: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.extension; 2 | 3 | parcelable MethodInterface; -------------------------------------------------------------------------------- /app/src/main/aidl/com/drdisagree/colorblendr/service/IRootConnection.aidl: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.service; 2 | 3 | import android.content.om.OverlayIdentifier; 4 | import com.drdisagree.colorblendr.utils.fabricated.FabricatedOverlayResource; 5 | 6 | interface IRootConnection { 7 | boolean isRooted(); 8 | void setSystemUIRestartListener(); 9 | boolean isOverlayInstalled(String packageName); 10 | boolean isOverlayEnabled(String packageName); 11 | void enableOverlay(in List packages); 12 | void enableOverlayWithIdentifier(in List packages); 13 | boolean enableOverlayExclusive(in String packageName); 14 | boolean enableOverlayExclusiveInCategory(in String packageName); 15 | void disableOverlay(in List packages); 16 | void disableOverlayWithIdentifier(in List packages); 17 | void registerFabricatedOverlay(in FabricatedOverlayResource fabricatedOverlay); 18 | void unregisterFabricatedOverlay(in String packageName); 19 | boolean setHighestPriority(String packageName); 20 | boolean setLowestPriority(String packageName); 21 | OverlayIdentifier generateOverlayIdentifier(String packageName); 22 | void invalidateCachesForOverlay(String packageName); 23 | void uninstallOverlayUpdates(String packageName); 24 | void restartSystemUI(); 25 | String[] runCommand(in List command); 26 | } -------------------------------------------------------------------------------- /app/src/main/aidl/com/drdisagree/colorblendr/service/IShizukuConnection.aidl: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.service; 2 | 3 | interface IShizukuConnection { 4 | void destroy() = 16777114; 5 | void exit() = 1; 6 | void applyFabricatedColors(String jsonString) = 2; 7 | void removeFabricatedColors() = 3; 8 | String getCurrentSettings() = 4; 9 | } -------------------------------------------------------------------------------- /app/src/main/aidl/com/drdisagree/colorblendr/utils/fabricated/FabricatedOverlayResource.aidl: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.utils.fabricated; 2 | 3 | parcelable FabricatedOverlayResource; -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ColorBlendr.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr 2 | 3 | import android.app.Application 4 | import android.content.Context 5 | import com.drdisagree.colorblendr.provider.RootConnectionProvider 6 | import com.drdisagree.colorblendr.provider.ShizukuConnectionProvider 7 | import com.drdisagree.colorblendr.service.IRootConnection 8 | import com.drdisagree.colorblendr.service.IShizukuConnection 9 | import com.google.android.material.color.DynamicColors 10 | import org.lsposed.hiddenapibypass.HiddenApiBypass 11 | import java.lang.ref.WeakReference 12 | 13 | class ColorBlendr : Application() { 14 | 15 | override fun onCreate() { 16 | super.onCreate() 17 | instance = this 18 | contextReference = WeakReference( 19 | applicationContext 20 | ) 21 | DynamicColors.applyToActivitiesIfAvailable(this) 22 | } 23 | 24 | override fun attachBaseContext(base: Context) { 25 | super.attachBaseContext(base) 26 | HiddenApiBypass.addHiddenApiExemptions("L") 27 | } 28 | 29 | companion object { 30 | private lateinit var instance: ColorBlendr 31 | private lateinit var contextReference: WeakReference 32 | 33 | val appContext: Context 34 | get() { 35 | if (!this::contextReference.isInitialized || contextReference.get() == null) { 36 | contextReference = WeakReference( 37 | getInstance().applicationContext 38 | ) 39 | } 40 | return contextReference.get()!! 41 | } 42 | 43 | private fun getInstance(): ColorBlendr { 44 | if (!this::instance.isInitialized) { 45 | instance = ColorBlendr() 46 | } 47 | return instance 48 | } 49 | 50 | val rootConnection: IRootConnection? 51 | get() = RootConnectionProvider.getServiceProvider 52 | 53 | val shizukuConnection: IShizukuConnection? 54 | get() = ShizukuConnectionProvider.getServiceProvider 55 | } 56 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/dao/CustomStyleDao.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.dao 2 | 3 | import androidx.room.Dao 4 | import androidx.room.Delete 5 | import androidx.room.Insert 6 | import androidx.room.OnConflictStrategy 7 | import androidx.room.Query 8 | import androidx.room.Update 9 | import com.drdisagree.colorblendr.data.common.Constant.CUSTOM_STYLE_TABLE 10 | import com.drdisagree.colorblendr.data.models.CustomStyleModel 11 | 12 | @Dao 13 | interface CustomStyleDao { 14 | @Insert(onConflict = OnConflictStrategy.REPLACE) 15 | suspend fun insertCustomStyle(customStyle: CustomStyleModel) 16 | 17 | @Update 18 | suspend fun updateCustomStyle(customStyle: CustomStyleModel) 19 | 20 | @Delete 21 | suspend fun deleteCustomStyle(customStyle: CustomStyleModel) 22 | 23 | @Query("SELECT * FROM $CUSTOM_STYLE_TABLE") 24 | suspend fun getAllCustomStyles(): List 25 | 26 | @Query("SELECT * FROM $CUSTOM_STYLE_TABLE WHERE styleId = :styleId LIMIT 1") 27 | suspend fun getCustomStyleById(styleId: String): CustomStyleModel? 28 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/database/AppDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.database 2 | 3 | import androidx.room.Database 4 | import androidx.room.Room 5 | import androidx.room.RoomDatabase 6 | import androidx.room.TypeConverters 7 | import com.drdisagree.colorblendr.ColorBlendr.Companion.appContext 8 | import com.drdisagree.colorblendr.data.common.Constant.DATABASE_NAME 9 | import com.drdisagree.colorblendr.data.dao.CustomStyleDao 10 | import com.drdisagree.colorblendr.data.models.CustomStyleModel 11 | 12 | @Database(entities = [CustomStyleModel::class], version = 1) 13 | @TypeConverters(Converters::class) 14 | abstract class AppDatabase : RoomDatabase() { 15 | abstract fun customStyleDao(): CustomStyleDao 16 | 17 | companion object { 18 | @Volatile 19 | private var INSTANCE: AppDatabase? = null 20 | 21 | fun getInstance(): AppDatabase { 22 | return INSTANCE ?: synchronized(this) { 23 | Room.databaseBuilder( 24 | appContext, 25 | AppDatabase::class.java, 26 | DATABASE_NAME 27 | ).build().also { INSTANCE = it } 28 | } 29 | } 30 | 31 | fun reloadInstance() { 32 | synchronized(this) { 33 | INSTANCE = Room.databaseBuilder( 34 | appContext, 35 | AppDatabase::class.java, 36 | DATABASE_NAME 37 | ).build() 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/database/Converters.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.database 2 | 3 | import androidx.room.TypeConverter 4 | import com.drdisagree.colorblendr.data.common.Constant.GSON 5 | import com.google.gson.reflect.TypeToken 6 | 7 | class Converters { 8 | @TypeConverter 9 | fun fromPalette(palette: ArrayList>?): String? { 10 | val type = object : TypeToken>>() {}.type 11 | return GSON.toJson(palette, type) 12 | } 13 | 14 | @TypeConverter 15 | fun toPalette(paletteString: String?): ArrayList>? { 16 | val type = object : TypeToken>>() {}.type 17 | return GSON.fromJson(paletteString, type) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/enums/AppType.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.enums 2 | 3 | enum class AppType { 4 | SYSTEM, 5 | USER, 6 | LAUNCHABLE, 7 | ALL 8 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/enums/MonetStyle.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.enums 2 | 3 | enum class MONET { 4 | SPRITZ, 5 | MONOCHROMATIC, 6 | TONAL_SPOT, 7 | VIBRANT, 8 | RAINBOW, 9 | EXPRESSIVE, 10 | FIDELITY, 11 | CONTENT, 12 | FRUIT_SALAD; 13 | 14 | override fun toString(): String { 15 | return name 16 | } 17 | 18 | companion object { 19 | fun String?.toEnumMonet(): MONET { 20 | return entries.find { it.name.equals(this, ignoreCase = true) } ?: TONAL_SPOT 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/enums/WorkMethod.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.enums 2 | 3 | enum class WorkMethod { 4 | NULL, 5 | ROOT, 6 | SHIZUKU; 7 | 8 | companion object { 9 | fun fromString(str: String?): WorkMethod { 10 | return try { 11 | valueOf(str!!) 12 | } catch (e: Exception) { 13 | NULL 14 | } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/models/AboutAppModel.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.models 2 | 3 | import com.drdisagree.colorblendr.ui.adapters.AboutAppAdapter.Companion.TYPE_ABOUT_APP 4 | import com.drdisagree.colorblendr.ui.adapters.AboutAppAdapter.Companion.TYPE_CREDITS_HEADER 5 | import com.drdisagree.colorblendr.ui.adapters.AboutAppAdapter.Companion.TYPE_CREDITS_ITEM 6 | 7 | class AboutAppModel { 8 | 9 | var layout = 0 10 | var icon: String = "" 11 | var title: String = "" 12 | var desc: String = "" 13 | var url: String = "" 14 | var viewType: Int = TYPE_CREDITS_ITEM 15 | 16 | constructor(layout: Int) { 17 | this.layout = layout 18 | this.viewType = TYPE_ABOUT_APP 19 | } 20 | 21 | constructor(title: String) { 22 | this.title = title 23 | this.viewType = TYPE_CREDITS_HEADER 24 | } 25 | 26 | constructor(title: String, desc: String, url: String, icon: String) { 27 | this.title = title 28 | this.desc = desc 29 | this.icon = icon 30 | this.url = url 31 | this.viewType = TYPE_CREDITS_ITEM 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/models/AppInfoModel.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.models 2 | 3 | import android.graphics.drawable.Drawable 4 | 5 | data class AppInfoModel( 6 | var appName: String, 7 | var packageName: String, 8 | var appIcon: Drawable, 9 | var isSelected: Boolean = false 10 | ) 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/models/CustomStyleModel.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.models 2 | 3 | import androidx.room.Entity 4 | import androidx.room.PrimaryKey 5 | import com.drdisagree.colorblendr.data.common.Constant.CUSTOM_STYLE_TABLE 6 | import com.drdisagree.colorblendr.data.enums.MONET 7 | import java.util.UUID 8 | 9 | @Entity(tableName = CUSTOM_STYLE_TABLE) 10 | data class CustomStyleModel( 11 | @PrimaryKey val styleId: String = UUID.randomUUID().toString(), 12 | var styleName: String, 13 | var description: String, 14 | val prefsGson: String, 15 | val monet: MONET, 16 | val palette: ArrayList> 17 | ) 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/models/StyleModel.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.models 2 | 3 | import com.drdisagree.colorblendr.data.enums.MONET 4 | 5 | data class StyleModel( 6 | val titleResId: Int = 0, 7 | val descriptionResId: Int = 0, 8 | val isEnabled: Boolean = false, 9 | val monetStyle: MONET, 10 | val customStyle: CustomStyleModel? = null 11 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/data/repository/CustomStyleRepository.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.data.repository 2 | 3 | import com.drdisagree.colorblendr.data.dao.CustomStyleDao 4 | import com.drdisagree.colorblendr.data.models.CustomStyleModel 5 | 6 | class CustomStyleRepository(private val customStyleDao: CustomStyleDao) { 7 | suspend fun getCustomStyles(): List { 8 | return customStyleDao.getAllCustomStyles() 9 | } 10 | 11 | suspend fun saveCustomStyle(customStyle: CustomStyleModel) { 12 | customStyleDao.insertCustomStyle(customStyle) 13 | } 14 | 15 | suspend fun updateCustomStyle(customStyle: CustomStyleModel) { 16 | customStyleDao.updateCustomStyle(customStyle) 17 | } 18 | 19 | suspend fun deleteCustomStyle(customStyle: CustomStyleModel) { 20 | customStyleDao.deleteCustomStyle(customStyle) 21 | } 22 | 23 | suspend fun getCustomStyleById(styleId: String): CustomStyleModel? { 24 | return customStyleDao.getCustomStyleById(styleId) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/provider/RemotePrefProvider.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.provider 2 | 3 | import com.crossbowffs.remotepreferences.RemotePreferenceFile 4 | import com.crossbowffs.remotepreferences.RemotePreferenceProvider 5 | import com.drdisagree.colorblendr.BuildConfig 6 | import com.drdisagree.colorblendr.data.common.Constant 7 | 8 | class RemotePrefProvider : RemotePreferenceProvider( 9 | BuildConfig.APPLICATION_ID, 10 | arrayOf(RemotePreferenceFile(Constant.SHARED_PREFS, true)) 11 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/provider/ShizukuConnectionProvider.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.provider 2 | 3 | import android.content.ComponentName 4 | import android.content.ServiceConnection 5 | import android.os.IBinder 6 | import android.util.Log 7 | import com.drdisagree.colorblendr.service.IShizukuConnection 8 | import com.drdisagree.colorblendr.service.ShizukuConnection 9 | import com.drdisagree.colorblendr.utils.shizuku.ShizukuUtil.bindUserService 10 | import com.drdisagree.colorblendr.utils.shizuku.ShizukuUtil.getUserServiceArgs 11 | import kotlinx.coroutines.CoroutineScope 12 | import kotlinx.coroutines.Dispatchers 13 | import kotlinx.coroutines.launch 14 | 15 | object ShizukuConnectionProvider { 16 | 17 | private val TAG: String = ShizukuConnectionProvider::class.java.simpleName 18 | var serviceProvider: IShizukuConnection? = null 19 | private var isServiceConnected = false 20 | 21 | val serviceConnection: ServiceConnection = object : ServiceConnection { 22 | override fun onServiceConnected(name: ComponentName, binder: IBinder?) { 23 | if (binder == null || !binder.pingBinder()) { 24 | Log.w(TAG, "Service binder is null or not alive") 25 | return 26 | } 27 | 28 | serviceProvider = IShizukuConnection.Stub.asInterface(binder) 29 | isServiceConnected = true 30 | Log.i(TAG, "Service connected") 31 | } 32 | 33 | override fun onServiceDisconnected(name: ComponentName) { 34 | serviceProvider = null 35 | isServiceConnected = false 36 | Log.w(TAG, "Service disconnected") 37 | bindServiceConnection() 38 | } 39 | } 40 | 41 | val isNotConnected: Boolean 42 | get() = !isServiceConnected 43 | 44 | val getServiceProvider: IShizukuConnection? 45 | get() = serviceProvider 46 | 47 | private fun bindServiceConnection() { 48 | if (isServiceConnected) { 49 | return 50 | } 51 | 52 | CoroutineScope(Dispatchers.Main).launch { 53 | bindUserService( 54 | getUserServiceArgs(ShizukuConnection::class.java), 55 | serviceConnection 56 | ) 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/service/RestartBroadcastReceiver.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.service 2 | 3 | import android.app.job.JobInfo 4 | import android.app.job.JobScheduler 5 | import android.content.BroadcastReceiver 6 | import android.content.ComponentName 7 | import android.content.Context 8 | import android.content.Intent 9 | import android.util.Log 10 | 11 | class RestartBroadcastReceiver : BroadcastReceiver() { 12 | override fun onReceive(context: Context, intent: Intent) { 13 | Log.i(TAG, "Service Stopped, but this is a never ending service.") 14 | scheduleJob(context) 15 | } 16 | 17 | companion object { 18 | private val TAG: String = RestartBroadcastReceiver::class.java.simpleName 19 | private var jobScheduler: JobScheduler? = null 20 | 21 | fun scheduleJob(context: Context) { 22 | if (jobScheduler == null) { 23 | jobScheduler = 24 | context.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler 25 | } 26 | 27 | val componentName = ComponentName(context, ScheduledJobService::class.java) 28 | 29 | val jobInfo = JobInfo.Builder(1, componentName) 30 | .setOverrideDeadline(0) 31 | .setPersisted(true).build() 32 | 33 | jobScheduler!!.schedule(jobInfo) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/service/ScheduledJobService.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.service 2 | 3 | import android.app.job.JobParameters 4 | import android.app.job.JobService 5 | import android.content.Intent 6 | import android.util.Log 7 | import androidx.work.Configuration 8 | 9 | class ScheduledJobService internal constructor() : JobService() { 10 | 11 | init { 12 | val builder: Configuration.Builder = Configuration.Builder() 13 | builder.setJobSchedulerJobIdRange(0, 1000) 14 | } 15 | 16 | override fun onStartJob(jobParameters: JobParameters): Boolean { 17 | val serviceLauncher = ServiceLauncher() 18 | serviceLauncher.launchService(this) 19 | 20 | return false 21 | } 22 | 23 | override fun onStopJob(jobParameters: JobParameters): Boolean { 24 | Log.i(TAG, "Stopping job...") 25 | 26 | val broadcastIntent = Intent(applicationContext.packageName) 27 | sendBroadcast(broadcastIntent) 28 | 29 | return false 30 | } 31 | 32 | companion object { 33 | private val TAG: String = ScheduledJobService::class.java.simpleName 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/service/ServiceLauncher.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.service 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import android.util.Log 6 | 7 | class ServiceLauncher { 8 | private fun setServiceIntent(context: Context) { 9 | if (serviceIntent == null) { 10 | serviceIntent = Intent( 11 | context, 12 | AutoStartService::class.java 13 | ) 14 | } 15 | } 16 | 17 | fun launchService(context: Context?) { 18 | if (context == null) { 19 | return 20 | } 21 | 22 | setServiceIntent(context) 23 | 24 | if (AutoStartService.isServiceNotRunning) { 25 | Log.d(TAG, "launchService: Service is starting...") 26 | context.startForegroundService(serviceIntent) 27 | } 28 | } 29 | 30 | companion object { 31 | private val TAG: String = ServiceLauncher::class.java.simpleName 32 | private var serviceIntent: Intent? = null 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/adapters/FragmentAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.adapters 2 | 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentActivity 5 | import androidx.viewpager2.adapter.FragmentStateAdapter 6 | 7 | class FragmentAdapter(fragmentActivity: FragmentActivity, private val fragments: List) : 8 | FragmentStateAdapter(fragmentActivity) { 9 | 10 | override fun createFragment(position: Int): Fragment { 11 | if (position >= 0 && position < fragments.size) { 12 | return fragments[position] 13 | } else { 14 | throw IndexOutOfBoundsException("Invalid fragment position: $position") 15 | } 16 | } 17 | 18 | override fun getItemCount(): Int { 19 | return fragments.size 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/adapters/OnboardingAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.adapters 2 | 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentManager 5 | import androidx.lifecycle.Lifecycle 6 | import androidx.viewpager2.adapter.FragmentStateAdapter 7 | 8 | class OnboardingAdapter(fragmentManager: FragmentManager, lifecycle: Lifecycle) : 9 | FragmentStateAdapter(fragmentManager, lifecycle) { 10 | 11 | private val fragmentList = ArrayList() 12 | 13 | override fun createFragment(position: Int): Fragment { 14 | return fragmentList[position] 15 | } 16 | 17 | fun addFragment(fragment: Fragment) { 18 | fragmentList.add(fragment) 19 | } 20 | 21 | override fun getItemCount(): Int { 22 | return fragmentList.size 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/fragments/onboarding/pages/OnboardingItem1Fragment.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.fragments.onboarding.pages 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | import com.drdisagree.colorblendr.databinding.FragmentOnboardingItem1Binding 9 | 10 | class OnboardingItem1Fragment : Fragment() { 11 | 12 | private lateinit var binding: FragmentOnboardingItem1Binding 13 | 14 | override fun onCreateView( 15 | inflater: LayoutInflater, 16 | container: ViewGroup?, 17 | savedInstanceState: Bundle? 18 | ): View { 19 | binding = FragmentOnboardingItem1Binding.inflate(inflater, container, false) 20 | return binding.getRoot() 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/fragments/onboarding/pages/OnboardingItem4Fragment.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.fragments.onboarding.pages 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | import com.drdisagree.colorblendr.data.common.Constant.WORKING_METHOD 9 | import com.drdisagree.colorblendr.data.enums.WorkMethod 10 | import com.drdisagree.colorblendr.databinding.FragmentOnboardingItem4Binding 11 | 12 | class OnboardingItem4Fragment : Fragment() { 13 | 14 | private lateinit var binding: FragmentOnboardingItem4Binding 15 | 16 | override fun onCreateView( 17 | inflater: LayoutInflater, 18 | container: ViewGroup?, 19 | savedInstanceState: Bundle? 20 | ): View { 21 | binding = FragmentOnboardingItem4Binding.inflate(inflater, container, false) 22 | 23 | binding.root.setOnClickListener { 24 | WORKING_METHOD = WorkMethod.ROOT 25 | binding.shizuku.isSelected = false 26 | } 27 | 28 | binding.shizuku.setOnClickListener { 29 | WORKING_METHOD = WorkMethod.SHIZUKU 30 | binding.root.isSelected = false 31 | } 32 | 33 | return binding.getRoot() 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/viewmodels/SharedViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.viewmodels 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.lifecycle.MutableLiveData 5 | import androidx.lifecycle.ViewModel 6 | 7 | class SharedViewModel : ViewModel() { 8 | 9 | private val booleanStates: MutableLiveData> = MutableLiveData() 10 | 11 | fun getBooleanStates(): LiveData> { 12 | return booleanStates 13 | } 14 | 15 | fun setBooleanState(viewId: String, state: Boolean) { 16 | val currentStates: MutableMap = booleanStates.getValue() ?: HashMap() 17 | currentStates[viewId] = state 18 | booleanStates.value = currentStates 19 | } 20 | 21 | private val visibilityStates: MutableLiveData> = MutableLiveData() 22 | 23 | fun getVisibilityStates(): LiveData> { 24 | return visibilityStates 25 | } 26 | 27 | fun setVisibilityState(viewId: String, visibility: Int) { 28 | val currentStates: MutableMap = visibilityStates.getValue() ?: HashMap() 29 | currentStates[viewId] = visibility 30 | visibilityStates.value = currentStates 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/views/ResizableSeekbar.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.views 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.appcompat.widget.AppCompatSeekBar 6 | 7 | class ResizableSeekbar : AppCompatSeekBar { 8 | 9 | constructor(context: Context) : super(context) 10 | 11 | constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) 12 | 13 | constructor(context: Context, attrs: AttributeSet?, defStyle: Int) : super( 14 | context, 15 | attrs, 16 | defStyle 17 | ) 18 | 19 | @Synchronized 20 | override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { 21 | super.onSizeChanged(w, h, oldw, oldh) 22 | 23 | val trackDrawable = progressDrawable.current 24 | trackDrawable.setBounds(0, 0, measuredWidth, measuredHeight) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/ui/views/RoundedMaterialButtonToggleGroup.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.ui.views 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.View 6 | import com.google.android.material.button.MaterialButton 7 | import com.google.android.material.button.MaterialButtonToggleGroup 8 | import com.google.android.material.shape.ShapeAppearanceModel 9 | 10 | class RoundedMaterialButtonToggleGroup : MaterialButtonToggleGroup { 11 | 12 | constructor(context: Context) : super(context) 13 | 14 | constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) 15 | 16 | constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super( 17 | context, 18 | attrs, 19 | defStyleAttr 20 | ) 21 | 22 | override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { 23 | super.onMeasure(widthMeasureSpec, heightMeasureSpec) 24 | 25 | for (i in 0 until childCount) { 26 | val childView: View = getChildAt(i) 27 | if (childView is MaterialButton) { 28 | if (childView.getVisibility() == GONE) { 29 | continue 30 | } 31 | 32 | val builder: ShapeAppearanceModel.Builder = 33 | childView.shapeAppearanceModel.toBuilder() 34 | val radius: Float = 120 * resources.displayMetrics.density 35 | childView.shapeAppearanceModel = builder 36 | .setTopLeftCornerSize(radius) 37 | .setBottomLeftCornerSize(radius) 38 | .setTopRightCornerSize(radius) 39 | .setBottomRightCornerSize(radius).build() 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/annotations/Test.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.utils.annotations 2 | 3 | /* 4 | * Annotation to mark fields and methods used for testing purposes only. 5 | */ 6 | @Retention(AnnotationRetention.SOURCE) 7 | @Target( 8 | AnnotationTarget.FIELD, 9 | AnnotationTarget.FUNCTION, 10 | AnnotationTarget.PROPERTY_GETTER, 11 | AnnotationTarget.PROPERTY_SETTER 12 | ) 13 | annotation class Test 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/app/SystemUtil.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.utils.app 2 | 3 | import android.content.pm.PackageManager 4 | import android.content.res.Configuration 5 | import com.drdisagree.colorblendr.ColorBlendr.Companion.appContext 6 | 7 | object SystemUtil { 8 | 9 | val isDarkMode: Boolean 10 | get() = (appContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES) == Configuration.UI_MODE_NIGHT_YES 11 | 12 | fun isAppInstalled(packageName: String): Boolean { 13 | try { 14 | appContext 15 | .packageManager 16 | .getPackageInfo(packageName, PackageManager.GET_META_DATA) 17 | return true 18 | } catch (ignored: PackageManager.NameNotFoundException) { 19 | return false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/fabricated/FabricatedOverlayEntry.kt: -------------------------------------------------------------------------------- 1 | package com.drdisagree.colorblendr.utils.fabricated 2 | 3 | import android.os.Build 4 | import android.os.Parcel 5 | import android.os.Parcelable 6 | 7 | open class FabricatedOverlayEntry : Parcelable { 8 | var resourceName: String? 9 | var resourceType: Int 10 | var resourceValue: Int 11 | private var configuration: String? 12 | 13 | constructor( 14 | resourceName: String?, 15 | resourceType: Int, 16 | resourceValue: Int, 17 | configuration: String? = null 18 | ) { 19 | this.resourceName = resourceName 20 | this.resourceType = resourceType 21 | this.resourceValue = resourceValue 22 | this.configuration = configuration 23 | } 24 | 25 | fun getConfiguration(): String? { 26 | return if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) null else configuration 27 | } 28 | 29 | fun setConfiguration(configuration: String?) { 30 | this.configuration = configuration 31 | } 32 | 33 | protected constructor(`in`: Parcel) { 34 | resourceName = `in`.readString() 35 | resourceType = `in`.readInt() 36 | resourceValue = `in`.readInt() 37 | configuration = `in`.readString() 38 | } 39 | 40 | override fun describeContents(): Int { 41 | return 0 42 | } 43 | 44 | override fun writeToParcel(dest: Parcel, flags: Int) { 45 | dest.writeString(resourceName) 46 | dest.writeInt(resourceType) 47 | dest.writeInt(resourceValue) 48 | dest.writeString(configuration) 49 | } 50 | 51 | companion object CREATOR : Parcelable.Creator { 52 | override fun createFromParcel(parcel: Parcel): FabricatedOverlayEntry { 53 | return FabricatedOverlayEntry(parcel) 54 | } 55 | 56 | override fun newArray(size: Int): Array { 57 | return arrayOfNulls(size) 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/dislike/DislikeAnalyzer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.dislike; 18 | 19 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 20 | 21 | /** 22 | * Check and/or fix universally disliked colors. 23 | * 24 | *

Color science studies of color preference indicate universal distaste for dark yellow-greens, 25 | * and also show this is correlated to distate for biological waste and rotting food. 26 | * 27 | *

See Palmer and Schloss, 2010 or Schloss and Palmer's Chapter 21 in Handbook of Color 28 | * Psychology (2015). 29 | */ 30 | public final class DislikeAnalyzer { 31 | 32 | private DislikeAnalyzer() { 33 | throw new UnsupportedOperationException(); 34 | } 35 | 36 | /** 37 | * Returns true if color is disliked. 38 | * 39 | *

Disliked is defined as a dark yellow-green that is not neutral. 40 | */ 41 | public static boolean isDisliked(Hct hct) { 42 | final boolean huePasses = Math.round(hct.getHue()) >= 90.0 && Math.round(hct.getHue()) <= 111.0; 43 | final boolean chromaPasses = Math.round(hct.getChroma()) > 16.0; 44 | final boolean tonePasses = Math.round(hct.getTone()) < 65.0; 45 | 46 | return huePasses && chromaPasses && tonePasses; 47 | } 48 | 49 | /** 50 | * If color is disliked, lighten it to make it likable. 51 | */ 52 | public static Hct fixIfDisliked(Hct hct) { 53 | if (isDisliked(hct)) { 54 | return Hct.from(hct.getHue(), hct.getChroma(), 70.0); 55 | } 56 | 57 | return hct; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/dynamiccolor/TonePolarity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.dynamiccolor; 18 | 19 | /** 20 | * Describes the relationship in lightness between two colors. 21 | * 22 | *

'nearer' and 'farther' describes closeness to the surface roles. For instance, 23 | * ToneDeltaPair(A, B, 10, 'nearer', stayTogether) states that A should be 10 lighter than B in 24 | * light mode, and 10 darker than B in dark mode. 25 | * 26 | *

See `ToneDeltaPair` for details. 27 | */ 28 | public enum TonePolarity { 29 | DARKER, LIGHTER, NEARER, FARTHER 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/dynamiccolor/Variant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.drdisagree.colorblendr.utils.monet.dynamiccolor; 17 | 18 | /** 19 | * Themes for Dynamic Color. 20 | */ 21 | public enum Variant { 22 | MONOCHROME, NEUTRAL, TONAL_SPOT, VIBRANT, EXPRESSIVE, FIDELITY, CONTENT, RAINBOW, FRUIT_SALAD 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/quantize/PointProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.quantize; 18 | 19 | /** 20 | * An interface to allow use of different color spaces by quantizers. 21 | */ 22 | public interface PointProvider { 23 | /** 24 | * The four components in the color space of an sRGB color. 25 | */ 26 | double[] fromInt(int argb); 27 | 28 | /** 29 | * The ARGB (i.e. hex code) representation of this color. 30 | */ 31 | int toInt(double[] point); 32 | 33 | /** 34 | * Squared distance between two colors. Distance is defined by scientific color spaces and 35 | * referred to as delta E. 36 | */ 37 | double distance(double[] a, double[] b); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/quantize/Quantizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.quantize; 18 | 19 | interface Quantizer { 20 | QuantizerResult quantize(int[] pixels, int maxColors); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/quantize/QuantizerMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.quantize; 18 | 19 | import java.util.LinkedHashMap; 20 | import java.util.Map; 21 | 22 | /** 23 | * Creates a dictionary with keys of colors, and values of count of the color 24 | */ 25 | public final class QuantizerMap implements Quantizer { 26 | Map colorToCount; 27 | 28 | @Override 29 | public QuantizerResult quantize(int[] pixels, int colorCount) { 30 | final Map pixelByCount = new LinkedHashMap<>(); 31 | for (int pixel : pixels) { 32 | final Integer currentPixelCount = pixelByCount.get(pixel); 33 | final int newPixelCount = currentPixelCount == null ? 1 : currentPixelCount + 1; 34 | pixelByCount.put(pixel, newPixelCount); 35 | } 36 | colorToCount = pixelByCount; 37 | return new QuantizerResult(pixelByCount); 38 | } 39 | 40 | public Map getColorToCount() { 41 | return colorToCount; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/quantize/QuantizerResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.quantize; 18 | 19 | import java.util.Map; 20 | 21 | /** 22 | * Represents result of a quantizer run 23 | */ 24 | public final class QuantizerResult { 25 | public final Map colorToCount; 26 | 27 | QuantizerResult(Map colorToCount) { 28 | this.colorToCount = colorToCount; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/scheme/SchemeFruitSalad.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.drdisagree.colorblendr.utils.monet.scheme; 17 | 18 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.DynamicScheme; 19 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.Variant; 20 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 21 | import com.drdisagree.colorblendr.utils.monet.palettes.TonalPalette; 22 | import com.drdisagree.colorblendr.utils.monet.utils.MathUtils; 23 | 24 | /** 25 | * A playful theme - the source color's hue does not appear in the theme. 26 | */ 27 | public class SchemeFruitSalad extends DynamicScheme { 28 | public SchemeFruitSalad(Hct sourceColorHct, boolean isDark, double contrastLevel) { 29 | super(sourceColorHct, Variant.FRUIT_SALAD, isDark, contrastLevel, TonalPalette.fromHueAndChroma(MathUtils.sanitizeDegreesDouble(sourceColorHct.getHue() - 50.0), 48.0), TonalPalette.fromHueAndChroma(MathUtils.sanitizeDegreesDouble(sourceColorHct.getHue() - 50.0), 36.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 36.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 10.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 16.0)); 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/scheme/SchemeMonochrome.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.scheme; 18 | 19 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.DynamicScheme; 20 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.Variant; 21 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 22 | import com.drdisagree.colorblendr.utils.monet.palettes.TonalPalette; 23 | 24 | /** 25 | * A monochrome theme, colors are purely black / white / gray. 26 | */ 27 | public class SchemeMonochrome extends DynamicScheme { 28 | public SchemeMonochrome(Hct sourceColorHct, boolean isDark, double contrastLevel) { 29 | super(sourceColorHct, Variant.MONOCHROME, isDark, contrastLevel, TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/scheme/SchemeNeutral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.drdisagree.colorblendr.utils.monet.scheme; 17 | 18 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.DynamicScheme; 19 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.Variant; 20 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 21 | import com.drdisagree.colorblendr.utils.monet.palettes.TonalPalette; 22 | 23 | /** 24 | * A theme that's slightly more chromatic than monochrome, which is purely black / white / gray. 25 | */ 26 | public class SchemeNeutral extends DynamicScheme { 27 | public SchemeNeutral(Hct sourceColorHct, boolean isDark, double contrastLevel) { 28 | super(sourceColorHct, Variant.NEUTRAL, isDark, contrastLevel, TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 12.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 8.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 16.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 2.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 2.0)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/scheme/SchemeRainbow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.drdisagree.colorblendr.utils.monet.scheme; 17 | 18 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.DynamicScheme; 19 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.Variant; 20 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 21 | import com.drdisagree.colorblendr.utils.monet.palettes.TonalPalette; 22 | import com.drdisagree.colorblendr.utils.monet.utils.MathUtils; 23 | 24 | /** 25 | * A playful theme - the source color's hue does not appear in the theme. 26 | */ 27 | public class SchemeRainbow extends DynamicScheme { 28 | public SchemeRainbow(Hct sourceColorHct, boolean isDark, double contrastLevel) { 29 | super(sourceColorHct, Variant.RAINBOW, isDark, contrastLevel, TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 48.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 16.0), TonalPalette.fromHueAndChroma(MathUtils.sanitizeDegreesDouble(sourceColorHct.getHue() + 60.0), 24.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 0.0)); 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/scheme/SchemeTonalSpot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.drdisagree.colorblendr.utils.monet.scheme; 17 | 18 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.DynamicScheme; 19 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.Variant; 20 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 21 | import com.drdisagree.colorblendr.utils.monet.palettes.TonalPalette; 22 | import com.drdisagree.colorblendr.utils.monet.utils.MathUtils; 23 | 24 | /** 25 | * A calm theme, sedated colors that aren't particularly chromatic. 26 | */ 27 | public class SchemeTonalSpot extends DynamicScheme { 28 | public SchemeTonalSpot(Hct sourceColorHct, boolean isDark, double contrastLevel) { 29 | super(sourceColorHct, Variant.TONAL_SPOT, isDark, contrastLevel, TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 36.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 16.0), TonalPalette.fromHueAndChroma(MathUtils.sanitizeDegreesDouble(sourceColorHct.getHue() + 60.0), 24.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 6.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 8.0)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/scheme/SchemeVibrant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.drdisagree.colorblendr.utils.monet.scheme; 17 | 18 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.DynamicScheme; 19 | import com.drdisagree.colorblendr.utils.monet.dynamiccolor.Variant; 20 | import com.drdisagree.colorblendr.utils.monet.hct.Hct; 21 | import com.drdisagree.colorblendr.utils.monet.palettes.TonalPalette; 22 | 23 | /** 24 | * A loud theme, colorfulness is maximum for Primary palette, increased for others. 25 | */ 26 | public class SchemeVibrant extends DynamicScheme { 27 | private static final double[] HUES = {0, 41, 61, 101, 131, 181, 251, 301, 360}; 28 | private static final double[] SECONDARY_ROTATIONS = {18, 15, 10, 12, 15, 18, 15, 12, 12}; 29 | private static final double[] TERTIARY_ROTATIONS = {35, 30, 20, 25, 30, 35, 30, 25, 25}; 30 | 31 | public SchemeVibrant(Hct sourceColorHct, boolean isDark, double contrastLevel) { 32 | super(sourceColorHct, Variant.VIBRANT, isDark, contrastLevel, TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 200.0), TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, HUES, SECONDARY_ROTATIONS), 24.0), TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, HUES, TERTIARY_ROTATIONS), 32.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 10.0), TonalPalette.fromHueAndChroma(sourceColorHct.getHue(), 12.0)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/drdisagree/colorblendr/utils/monet/utils/StringUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.drdisagree.colorblendr.utils.monet.utils; 18 | 19 | /** 20 | * Utility methods for string representations of colors. 21 | */ 22 | final class StringUtils { 23 | private StringUtils() { 24 | } 25 | 26 | /** 27 | * Hex string representing color, ex. #ff0000 for red. 28 | * 29 | * @param argb ARGB representation of a color. 30 | */ 31 | public static String hexFromArgb(int argb) { 32 | int red = ColorUtils.redFromArgb(argb); 33 | int blue = ColorUtils.blueFromArgb(argb); 34 | int green = ColorUtils.greenFromArgb(argb); 35 | return String.format("#%02x%02x%02x", red, green, blue); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/adapters/HeightablePagerAdapter.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.adapters; 2 | 3 | import android.view.ViewGroup; 4 | 5 | import androidx.annotation.NonNull; 6 | import androidx.viewpager.widget.PagerAdapter; 7 | 8 | import me.jfenn.colorpickerdialog.views.HeightableViewPager; 9 | 10 | public abstract class HeightablePagerAdapter extends PagerAdapter implements HeightableViewPager.Heightable { 11 | 12 | private int position = -1; 13 | 14 | @Override 15 | public void setPrimaryItem(@NonNull ViewGroup container, int position, @NonNull Object object) { 16 | super.setPrimaryItem(container, position, object); 17 | 18 | if (position != this.position) { 19 | this.position = position; 20 | container.requestLayout(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/interfaces/ActivityRequestHandler.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.interfaces; 2 | 3 | import android.content.Intent; 4 | 5 | import androidx.annotation.Nullable; 6 | import androidx.fragment.app.FragmentManager; 7 | 8 | public interface ActivityRequestHandler { 9 | 10 | void handlePermissionsRequest(ActivityResultHandler resultHandler, String... permissions); 11 | 12 | void handleActivityRequest(ActivityResultHandler resultHandler, Intent intent); 13 | 14 | @Nullable 15 | FragmentManager requestFragmentManager(); 16 | 17 | @Nullable 18 | PickerTheme getPickerTheme(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/interfaces/ActivityResultHandler.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.interfaces; 2 | 3 | import android.content.Intent; 4 | 5 | public interface ActivityResultHandler { 6 | 7 | void onPermissionsResult(String[] permissions, int[] grantResults); 8 | 9 | void onActivityResult(int resultCode, Intent data); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/interfaces/OnColorPickedListener.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.interfaces; 2 | 3 | import androidx.annotation.ColorInt; 4 | import androidx.annotation.Nullable; 5 | 6 | public interface OnColorPickedListener { 7 | void onColorPicked(@Nullable T pickerView, @ColorInt int color); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/interfaces/PickerTheme.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.interfaces; 2 | 3 | import androidx.annotation.StyleRes; 4 | 5 | public interface PickerTheme { 6 | 7 | @StyleRes 8 | int requestTheme(); 9 | 10 | int requestCornerRadiusPx(); 11 | 12 | boolean requestRetainInstance(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/utils/ArrayUtils.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.utils; 2 | 3 | import java.util.Arrays; 4 | 5 | public class ArrayUtils { 6 | 7 | public static T[] push(T[] arr, T item) { 8 | T[] newArr = Arrays.copyOf(arr, arr.length + 1); 9 | newArr[newArr.length - 1] = item; 10 | return newArr; 11 | } 12 | 13 | public static T[] pop(T[] arr) { 14 | return Arrays.copyOf(arr, arr.length - 1); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/views/CircleImageView.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.views; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.Canvas; 6 | import android.graphics.Paint; 7 | import android.media.ThumbnailUtils; 8 | import android.util.AttributeSet; 9 | 10 | import androidx.appcompat.widget.AppCompatImageView; 11 | import androidx.core.graphics.drawable.RoundedBitmapDrawable; 12 | import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory; 13 | 14 | import me.jfenn.androidutils.ImageUtilsKt; 15 | 16 | public class CircleImageView extends AppCompatImageView { 17 | Paint paint; 18 | 19 | public CircleImageView(final Context context) { 20 | super(context); 21 | paint = new Paint(); 22 | } 23 | 24 | public CircleImageView(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | paint = new Paint(); 27 | } 28 | 29 | public CircleImageView(Context context, AttributeSet attrs, int defStyle) { 30 | super(context, attrs, defStyle); 31 | paint = new Paint(); 32 | } 33 | 34 | @Override 35 | public void onDraw(Canvas canvas) { 36 | Bitmap image = ImageUtilsKt.toBitmap(getDrawable()); 37 | if (image != null) { 38 | int size = Math.min(getWidth(), getHeight()); 39 | image = ThumbnailUtils.extractThumbnail(image, size, size); 40 | 41 | RoundedBitmapDrawable roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), image); 42 | 43 | roundedBitmapDrawable.setCornerRadius(size / 2); 44 | roundedBitmapDrawable.setAntiAlias(true); 45 | 46 | canvas.drawBitmap(ImageUtilsKt.toBitmap(roundedBitmapDrawable), 0, 0, paint); 47 | } 48 | } 49 | 50 | @Override 51 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 52 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 53 | 54 | int size = getMeasuredWidth(); 55 | setMeasuredDimension(size, size); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/views/RoundedSquareImageView.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.views; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Path; 6 | import android.graphics.RectF; 7 | import android.util.AttributeSet; 8 | 9 | import androidx.appcompat.widget.AppCompatImageView; 10 | import me.jfenn.androidutils.DimenUtilsKt; 11 | 12 | public class RoundedSquareImageView extends AppCompatImageView { 13 | 14 | private int radius; 15 | private Path path; 16 | private RectF rect; 17 | 18 | public RoundedSquareImageView(Context context) { 19 | super(context); 20 | init(); 21 | } 22 | 23 | public RoundedSquareImageView(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | init(); 26 | } 27 | 28 | public RoundedSquareImageView(Context context, AttributeSet attrs, int defStyle) { 29 | super(context, attrs, defStyle); 30 | init(); 31 | } 32 | 33 | private void init() { 34 | radius = DimenUtilsKt.dpToPx(4); 35 | path = new Path(); 36 | rect = new RectF(0, 0, getWidth(), getHeight()); 37 | } 38 | 39 | @Override 40 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 41 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 42 | 43 | int size = getMeasuredWidth(); 44 | setMeasuredDimension(size, size); 45 | rect.set(0, 0, size, size); 46 | } 47 | 48 | @Override 49 | protected void onDraw(Canvas canvas) { 50 | path.addRoundRect(rect, radius, radius, Path.Direction.CW); 51 | canvas.clipPath(path); 52 | super.onDraw(canvas); 53 | } 54 | } -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/views/color/HorizontalSmoothColorView.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.views.color; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.Nullable; 7 | import androidx.annotation.RequiresApi; 8 | 9 | public class HorizontalSmoothColorView extends SmoothColorView { 10 | 11 | public HorizontalSmoothColorView(Context context) { 12 | super(context); 13 | } 14 | 15 | public HorizontalSmoothColorView(Context context, @Nullable AttributeSet attrs) { 16 | super(context, attrs); 17 | } 18 | 19 | public HorizontalSmoothColorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 20 | super(context, attrs, defStyleAttr); 21 | } 22 | 23 | @RequiresApi(21) 24 | public HorizontalSmoothColorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { 25 | super(context, attrs, defStyleAttr, defStyleRes); 26 | } 27 | 28 | @Override 29 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 30 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 31 | 32 | int height = (int) (getMeasuredWidth() * 0.5625); 33 | setMeasuredDimension(getMeasuredWidth(), height); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/views/color/OrientationDiffListener.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.views.color; 2 | 3 | import android.content.Context; 4 | import android.view.OrientationEventListener; 5 | 6 | public abstract class OrientationDiffListener extends OrientationEventListener { 7 | 8 | private int rotation = -1; 9 | 10 | public OrientationDiffListener(Context context) { 11 | super(context); 12 | } 13 | 14 | @Override 15 | public void onOrientationChanged(int orientation) { 16 | int rotation; 17 | 18 | if (orientation <= 45 || orientation > 315) 19 | rotation = 0; 20 | else if (orientation <= 135) 21 | rotation = 1; 22 | else if (orientation <= 225) 23 | rotation = 2; 24 | else rotation = 3; 25 | 26 | if (this.rotation < 0) { 27 | this.rotation = rotation; 28 | return; 29 | } 30 | 31 | if (this.rotation != rotation) 32 | onRotationChanged(rotation); 33 | } 34 | 35 | public abstract void onRotationChanged(int rotation); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/me/jfenn/colorpickerdialog/views/color/VerticalSmoothColorView.java: -------------------------------------------------------------------------------- 1 | package me.jfenn.colorpickerdialog.views.color; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import androidx.annotation.Nullable; 7 | import androidx.annotation.RequiresApi; 8 | 9 | import me.jfenn.androidutils.DimenUtilsKt; 10 | 11 | public class VerticalSmoothColorView extends SmoothColorView { 12 | 13 | public VerticalSmoothColorView(Context context) { 14 | super(context); 15 | } 16 | 17 | public VerticalSmoothColorView(Context context, @Nullable AttributeSet attrs) { 18 | super(context, attrs); 19 | } 20 | 21 | public VerticalSmoothColorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 22 | super(context, attrs, defStyleAttr); 23 | } 24 | 25 | @RequiresApi(21) 26 | public VerticalSmoothColorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { 27 | super(context, attrs, defStyleAttr, defStyleRes); 28 | } 29 | 30 | @Override 31 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 32 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 33 | 34 | int size = getMeasuredHeight(); 35 | setMeasuredDimension(Math.min(DimenUtilsKt.dpToPx(200), size), size); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_left.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out_left.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out_right.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/color/color_searchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/color/color_seekbar_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/color/color_seekbar_progress_disabled.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_container_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_container_mid.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_container_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_icon_rounded.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_searchbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_searchbox_transparent.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/buymeacoffee_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/drawable/buymeacoffee_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/buymeacoffee_fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/drawable/buymeacoffee_fg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/color_table_square.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider_credits_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider_toggle_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_a_photo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_android.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_app_widgets.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_end.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_attach_file.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_backup.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_landscape_bg.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_landscape_fg.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_brush.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_checked_filled.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_checked_outline.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_clear.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_color_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_color_picker.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dark_icon.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_extension.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_filter_list.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_github.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_github_scaled.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_help_scaled.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_invert_colors.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_notification.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_light_dark.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_colors_filled.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_colors_outline.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_settings_filled.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_settings_outline.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_styles_filled.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_styles_outline.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_theme_filled.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_nav_theme_outline.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_news.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_news_scaled.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_paint.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_reset.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_restore.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_semi_transparent.xml: -------------------------------------------------------------------------------- 1 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_service.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings_starry.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_table_view.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_text.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_update.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_user_account.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_drdisagree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/drawable/img_drdisagree.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/preview_color_picker.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/seekbar_track.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/colorpicker_item_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/colorpicker_item_image.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/colorpicker_item_image_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 21 | 22 | 29 | 30 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/colorpicker_layout_image_picker.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 22 | 23 | 28 | 29 | 30 | 31 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/colorpicker_layout_preset_picker.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_color_palette.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 21 | 22 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_onboarding.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 20 | 21 | 33 | 34 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_per_app_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 19 | 20 | 24 | 25 | 31 | 32 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 29 | 30 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_style_preview.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_about_app_credits_header.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_color_palette_warn.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 19 | 20 | 29 | 30 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_text_field_outlined.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_wallpaper_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/menu/bottom_nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 |

3 | 8 | 13 | 18 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/menu/custom_style_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/settings_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahmud0808/ColorBlendr/e74280934fb4f0a5849d2e0912ba1bc5387bf27c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values-night-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @color/material_dynamic_neutral_variant20 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-night-v32/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @color/material_dynamic_neutral_variant20 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-night-v33/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @color/material_dynamic_neutral_variant20 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/material_dynamic_primary80 4 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/material_dynamic_primary50 4 | @color/material_dynamic_primary80 5 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @string/monet_neutral 5 | @string/monet_monochrome 6 | @string/monet_tonalspot 7 | @string/monet_vibrant 8 | @string/monet_rainbow 9 | @string/monet_expressive 10 | @string/monet_fidelity 11 | @string/monet_content 12 | @string/monet_fruitsalad 13 | 14 | 15 | 16 | #f9d99a 17 | #fa5f49 18 | #ff9800 19 | #59b4bc 20 | #d8f79a 21 | #95b8f6 22 | #7ff9c7 23 | #f3edc8 24 | #f7cae4 25 | #b186f1 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF000000 4 | #FFFFFFFF 5 | #00000000 6 | 7 | #D32F2F 8 | #388E3C 9 | #1976D2 10 | #000000 11 | @color/material_dynamic_primary50 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28dp 4 | 22dp 5 | 12dp 6 | 16dp 7 | 12dp 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/material_dynamic_primary40 4 | @color/material_dynamic_primary70 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 13 | 14 | 17 | 18 | 23 | 24 | 32 | 33 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 |