mask-image Alpha vs Luminance Mode Lookup

Mask alpha vs independently computed same-space luminance×alpha coverage, no hidden RGB transfer-function conversion or match-source inference. Explicit supplied computed/layout context only; not a browser cascade/layout engine or cross-browser guarantee.

Description

Mask coverage can depend on alpha alone or on luminance multiplied by alpha.

Mask coverage can depend on alpha alone or on luminance multiplied by alpha.1

The luminance input must already use the appropriate color-space convention. Use mask-image Alpha vs Luminance Mode Lookup to evaluate the supplied inputs under the specific model below.

When to use mask-image Alpha vs Luminance Mode Lookup

Use mask-image Alpha vs Luminance Mode Lookup to evaluate the supplied inputs under the specific model below. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.

How to use mask-image Alpha vs Luminance Mode Lookup and understand its results

  1. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
  2. Enter Caller same space luminance, Source alpha, Mask mode using the field table and validation rules below, then run the tool.
  3. Read Conditional mask coverage and interpret units, signs, ordering and placeholders as explained below.
  4. If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
Input fieldMeaningValue typeRequirement
callerSameSpaceLuminanceCaller same space luminancenumberRequired; constraints below
sourceAlphaSource alphanumberRequired; constraints below
maskModeMask modestringRequired; constraints below

Enter alpha and an independently established luminance from 0 to 1, with mode alpha or luminance. Effective mask coverage is alpha for alpha mode and alpha×luminance for luminance mode. This expects luminance to be supplied in the appropriate convention and performs no RGB conversion or image sampling.

coverage = mode==alpha ? alpha : alpha×luminance

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
conditionalMaskCoverageConditional mask coveragenumber
json
{
  "input": {
    "callerSameSpaceLuminance": 0.8,
    "sourceAlpha": 0.5,
    "maskMode": "luminance"
  },
  "output": {
    "conditionalMaskCoverage": 0.4
  }
}

Limitations and assumptions

The luminance input must already use the appropriate color-space convention. Apply the exact scope and assumptions described above.

All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.

Alternative or Complementary methods

Use flex-basis:auto Content Size Note for a related task: An automatic flex basis can use a definite main size or fall back to a content basis.

Use mix-blend-mode:difference Inversion Note for a related task: Difference blending compares channels in an established blending space.

References

  1. mask-image Alpha vs Luminance Mode Lookup — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies