Usage
$colorContrastRatio[;] Also callable as
$contrastRatio Arguments
| Name | Type | Required | Description |
|---|---|---|---|
color1 | String | Yes | First color. |
color2 | String | Yes | Second color. |
Output
NumberCalculates the WCAG contrast ratio between two colors (1.0–21.0). Higher = more contrast.
$colorContrastRatio[;] $contrastRatio | Name | Type | Required | Description |
|---|---|---|---|
color1 | String | Yes | First color. |
color2 | String | Yes | Second color. |
NumberWas this page helpful?