====== Shadows: Rule 5 - The Contrast Wall ======
This is a visibility rule ... **"If a shadow isn't seen ... there is a //contrast wall//!"**
In the Android rendering engine, shadows are not solid objects; but instead are mathematical blurs applied to the background. For a shadow to be visible, there must be a significant difference in brightness (Value) between the shadow and the wallpaper.
==== The Luminance Floor ====
The "eye" recognizes brightness as the subjective value of a measure of luminance.
On dark backgrounds (a luminance value < 20%, such as OLED black), low-alpha shadows effectively "sink" into the darkness and disappear. The "eye" does not register them.
* **The Problem:** When a light color is spread over a large radius, the "Luminance Density" drops. A 20% white shadow spread over a 50px radius becomes so thin it is invisible to the human eye.
{{ :section:section-shadow-rule5-luminance_floor.webp?direct&400 }}
* **The Solution:** To stay visible on dark themes, use a **Higher Alpha** (80%+) or **Solid Colors**.
----
==== Alpha Visualized ====
Shown here are reference characters of the Alpha's for "AA"RRGGBB:
{{ :section:section-shadow-alpha-80_100.webp?direct&500 }}
----
{{:ui:ui-color-hex-alpha_values.webp?200}}
^ Alpha cheat sheet\\ (most useful values) ^^^
^ Color Picker\\ Hex: FB00FA37\\ {{:ui:ui-color-hex-alpha_values-base_fb00fa37.webp?50}} ^^^
| Alpha | Transparency | Glass Effect |
| FF | 100% opaque | Solid |
| E6 | 90% | ::: |
| CC | 80% | Almost solid |
| B3 | 70% | ::: |
| 99 | 60% | ::: |
| 80 | 50% | Heavy glass |
| 66 | 40% | ::: |
| 4D | 30% | Medium glass |
| 33 | 20% | Light glass |
| 1A | 10% | Very light glass |
| 00 | 0% transparent |
----
==== Alpha Test Results ====
The images below show shadows (or lack of a shadow) when using the noted shadow options in the launcher's shadow dialog:
{{:section:section-shadow_controlled_tests_1_-_7.webp?direct&200 }}
{{:section:section-shadow_test_parameters.webp?direct&700 }}
\\ \\ \\
\\
----
==== Shadow Contrast Summary ====
{{tablelayout?colwidth="150px,150px,150px,150"&rowsHeaderSource=auto&float=center}}
^ **Summary:** ^^^^
^ Background Type ^ Shadow Strategy ^ Recommended Alpha ^ Result ^
| **Light Wallpaper** | Dark/Black Shadow | 20% – 50% (`40` to `80`) | **Success:** Soft, realistic depth. |
| **Dark Wallpaper** | White/Light Glow | 80% – 100% (`CC` to `FF`) | **Success:** A visible "Halo" or "Ambient Lift." |
| **Dark Wallpaper** | Any Shadow Color | Below 50% (`80`) | **FAILURE:** Shadow vanishes into the background noise. See [[:howto:howto-shadows-dark_background|this hack]] to overcome the failure. |
{{page>site:site-footer-comment_feedback_block}}