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
- Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
- Enter Caller same space luminance, Source alpha, Mask mode using the field table and validation rules below, then run the tool.
- Read Conditional mask coverage and interpret units, signs, ordering and placeholders as explained below.
- 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 field | Meaning | Value type | Requirement |
|---|---|---|---|
| callerSameSpaceLuminance | Caller same space luminance | number | Required; constraints below |
| sourceAlpha | Source alpha | number | Required; constraints below |
| maskMode | Mask mode | string | Required; 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 field | Meaning | Value type |
|---|---|---|
| conditionalMaskCoverage | Conditional mask coverage | number |
{
"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
Similar or alternative tools
- flex-basis:auto Content Size Note
An automatic flex basis can use a definite main size or fall back to a content basis.
- mix-blend-mode:difference Inversion Note
Difference blending compares channels in an established blending space.