Part of TPG namespace
TPG.Colors.Contrast(bg)📋 Has LDoc👁️ 0 viewsUpdated 1 month ago
Description
Black or white, whichever survives on top of the given fill. Standard luminance-weighted formula; ignores bg.a, so a translucent panel fill is judged as if it were opaque against whatever it actually sits on.
Parameters
| Name | Type | Description |
|---|---|---|
bg | Color | The fill colour text will be drawn over. |
Returns
| Type | Description |
|---|---|
Color | `C.TextDark` on light backgrounds, `C.Text` on dark ones. |
Examples
No examples available.
Used In
No usages found in the codebase.