PHPackages                             ruslanshigabutdinov/nativephp-color-scheme - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ruslanshigabutdinov/nativephp-color-scheme

ActiveNativephp-plugin[Utility &amp; Helpers](/categories/utility)

ruslanshigabutdinov/nativephp-color-scheme
==========================================

NativePHP Mobile plugin for reading and controlling the app color scheme.

v0.1.0(2mo ago)33↓50%MITPHPPHP ^8.3

Since May 22Pushed 2mo agoCompare

[ Source](https://github.com/RuslanShigabutdinov/nativephp-color-scheme)[ Packagist](https://packagist.org/packages/ruslanshigabutdinov/nativephp-color-scheme)[ Docs](https://github.com/RuslanShigabutdinov/nativephp-color-scheme)[ RSS](/packages/ruslanshigabutdinov-nativephp-color-scheme/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

NativePHP Color Scheme
======================

[](#nativephp-color-scheme)

Read and control your NativePHP Mobile app's native appearance preference from Laravel.

The plugin supports the common theme flow:

- `system`
- `light`
- `dark`

When the preference is `system`, the effective color scheme follows the device appearance.

Installation
------------

[](#installation)

```
composer require ruslanshigabutdinov/nativephp-color-scheme
```

Register the plugin:

```
php artisan native:plugin:register ruslanshigabutdinov/nativephp-color-scheme
```

If your app does not have `app/Providers/NativeServiceProvider.php` yet, publish it first:

```
php artisan vendor:publish --tag=nativephp-plugins-provider
```

Usage
-----

[](#usage)

```
use RuslanShigabutdinov\NativeColorScheme\Facades\NativeColorScheme;

NativeColorScheme::getPreference();  // system, light, dark, or null
NativeColorScheme::getColorScheme(); // effective light, dark, or null

NativeColorScheme::isSystem();
NativeColorScheme::isDark();
NativeColorScheme::isLight();
```

Set the app preference:

```
NativeColorScheme::useSystem();
NativeColorScheme::useLight();
NativeColorScheme::useDark();

NativeColorScheme::setPreference('system');
NativeColorScheme::setPreference('light');
NativeColorScheme::setPreference('dark');
```

`auto`, `device`, and `os` are accepted aliases for `system`:

```
NativeColorScheme::setPreference('auto');
```

Read the full state:

```
NativeColorScheme::state();

// [
//     'preference' => 'system',
//     'colorScheme' => 'dark',
//     'systemColorScheme' => 'dark',
//     'isSystem' => true,
//     'isDark' => true,
//     'isLight' => false,
// ]
```

Notes
-----

[](#notes)

Android is tested on device. iOS support is implemented, but still needs device/simulator validation.

On Android 12/API 31 and newer, the plugin applies the saved preference with native app night mode, which can help Android splash screens use the matching light or dark resources.

Because this package includes native Kotlin and Swift code, rebuild your NativePHP app after installing or updating it:

```
php artisan native:run
```

If native changes do not appear during development:

```
php artisan native:install --force
php artisan native:run
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance87

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

63d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36743b0c2de9ea5b2b2fa004733126721501924976ad97f1c6b4a29be0391f3f?d=identicon)[RusShig](/maintainers/RusShig)

---

Top Contributors

[![RuslanShigabutdinov](https://avatars.githubusercontent.com/u/58412212?v=4)](https://github.com/RuslanShigabutdinov "RuslanShigabutdinov (6 commits)")

---

Tags

androidiosnativephpdark-modecolor schemenativephp-mobile

### Embed Badge

![Health badge](/badges/ruslanshigabutdinov-nativephp-color-scheme/health.svg)

```
[![Health](https://phpackages.com/badges/ruslanshigabutdinov-nativephp-color-scheme/health.svg)](https://phpackages.com/packages/ruslanshigabutdinov-nativephp-color-scheme)
```

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

1.1k75.1k106](/packages/nativephp-mobile)[pkpass/pkpass

PHP PKPass class for iOS Wallet

9853.4M12](/packages/pkpass-pkpass)[eo/passbook

iOS Passbook for PHP

2651.6M3](/packages/eo-passbook)[chiiya/laravel-passes

Laravel library for creating iOS and Android Wallet Passes

37114.8k](/packages/chiiya-laravel-passes)[nativephp/desktop

NativePHP for Desktop

39742.4k8](/packages/nativephp-desktop)[nativephp/php-bin

PHP binaries used by the NativePHP framework

137240.7k5](/packages/nativephp-php-bin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
