Translations of this page:
  • en

Shadows: Rule 3 - The "1% Alpha" Workaround

To create a completely transparent, hollow shape that successfully displays a solid border and casts a shadow, the rendering engine's binary logic must be tricked. Under normal conditions, absolute transparency (0% Alpha) causes the engine to skip shadow calculations entirely.

The Technical Fix

  • The Action: - Set the shape's Alpha Fill opacity for Color 1 and Color 2 to 01, resulting in ARGB 01000000 (black) or ARGB 01FFFFFF (white).
  • Border Requirement: - A border width of at least 3 or 5 is required. A width of 1 may be mathematically clipped away by anti-aliasing on high-resolution screens.
  • Resulting Effect: - A hollow ring shadow that mirrors the border outline is cast rather than a solid dark circle.

Why This Happens

The 01 value represents approximately 0.4% opacity. To the human eye, the center remains completely transparent. Mathematically, however, the engine recognizes a >0% fill, which forces the calculation of the object's border and shadow. Because the fill is only 1% opaque, its specific shadow is functionally invisible, leaving only the shadow cast by the fully opaque border.

Technical Proof: Test 5

The following results from the controlled Test Matrix prove that Test 5 is the only configuration that bypasses the “Zero-Alpha” limitation to produce a hollow shadow.

Rendering Matrix (The Cause) Visual Results (The Effect)



  • Test 5 (The Success): - Demonstrates that the micro-opacity successfully forces the shadow to render behind an effectively invisible fill[cite:.
  • Tests 2, 3, & 4 (The Failures): - Confirm that absolute 0% Alpha Fill results in no shadow calculation, regardless of border thickness.

Practical Comparison

The success of Rule 3 is highly dependent on background contrast.

Success: White Ring on Blue ↔️ Failure: Dark Frame on Dark Blue
High luminance separation …
the hollow shadow clearly visible.
Low luminance shadow “sinks”
into the background (The Contrast Wall).

Discussion

Enter your comment. Wiki syntax is allowed:
Please solve the following equation to prove you're human. 37 +5​ =