mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-08 17:47:38 +00:00
71 lines
3.2 KiB
XML
71 lines
3.2 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<resources>
|
||
|
|
||
|
<!--
|
||
|
# Theme guide
|
||
|
|
||
|
This should provide all the information you need to create new !color! themes.
|
||
|
|
||
|
## Inheritance
|
||
|
|
||
|
You might want to inherit default values from "base" theme. You can do so implicitly by just
|
||
|
writing `<style name="ThemeFoundationMD2.MySuperAwesomeTheme" parent="ThemeFoundationMD2.Default">`.
|
||
|
With this approach you can only change values you (don't) like - such as `colorPrimary` or
|
||
|
`colorSecondary`.
|
||
|
There's also an option to define theme completely from ground up and that's done just by
|
||
|
omitting `parent="..."`. It will inherit _nothing_ from the base.
|
||
|
|
||
|
## Day / Night ? How do I define both in one theme?
|
||
|
|
||
|
Define Theme here for "Day" theme and in `values-night` directory define theme with same name
|
||
|
and parent if applicable. The framework will automatically switch between day/night themes based
|
||
|
on user's requested configuration. (Always light, Always dark, Follow system)
|
||
|
|
||
|
You might choose to define only "Day" theme with Dark colors to have dark theme regardless.
|
||
|
That's super lazy approach and is discouraged but the framework permits it. If not inherited
|
||
|
from default theme, you must define all colors yourself in both day AND night variants.
|
||
|
|
||
|
## What to theme
|
||
|
|
||
|
Generally I'd suggest theming only `colorPrimary`, `colorSecondary` and their variants. Make
|
||
|
sure that text is readable if displayed on primary or secondary color!
|
||
|
|
||
|
You can check that very easily by visiting https://www.colorhexa.com/. After you put in your
|
||
|
color hex, you can scroll down to "Preview" where it will compute whether dark/bright text
|
||
|
should be displayed on top of it. Then you must edit respective `colorOn...`.
|
||
|
|
||
|
Also check "Color Blindness Simulator". Primary and secondary colors must not match or be
|
||
|
similar in type. Text on color must have enough contrast so it can be read by everyone!
|
||
|
|
||
|
!! Themes that will not satisfy these requirements will be promptly deleted without further
|
||
|
!! notice. In repeated attempts to push such themes you will be automatically blacklisted.
|
||
|
-->
|
||
|
|
||
|
<style name="ThemeFoundationMD2" parent="" />
|
||
|
|
||
|
<!--1st party themes-->
|
||
|
|
||
|
<style name="ThemeFoundationMD2.Default">
|
||
|
<item name="colorPrimary">#2196F3</item>
|
||
|
<item name="colorPrimaryVariant">#802196F3</item>
|
||
|
<item name="colorSecondary">#1766A6</item>
|
||
|
<item name="colorSecondaryVariant">#801766A6</item>
|
||
|
<item name="colorSurface">#F2F2F2</item>
|
||
|
<item name="colorSurfaceVariant">#E8E8E8</item>
|
||
|
<item name="colorSurfaceSurfaceVariant">?colorSurface</item>
|
||
|
<item name="colorOnPrimary">#F2F2F2</item>
|
||
|
<item name="colorOnPrimaryVariant">#D9E6E6E6</item>
|
||
|
<item name="colorOnSecondary">#F2F2F2</item>
|
||
|
<item name="colorOnBackground">#F2F2F2</item>
|
||
|
<item name="colorError">#CC0047</item>
|
||
|
<item name="colorOnError">#F2F2F2</item>
|
||
|
<item name="colorOnSurface">#444444</item>
|
||
|
<item name="colorOnSurfaceVariant">#80444444</item>
|
||
|
<item name="colorDisabled">#808080</item>
|
||
|
<item name="colorDisabledVariant">#66808080</item>
|
||
|
</style>
|
||
|
|
||
|
|
||
|
<!--3rd party themes-->
|
||
|
|
||
|
</resources>
|