## contrast_ratio()


Compute the APCA contrast ratio between two colors.


Usage


``` python
contrast_ratio(
    bg_color,
    fg_color,
)
```


## Parameters


`bg_color: str`  
Background color as a hex string (e.g., `"#2c3e50"`).

`fg_color: str`  
Foreground (text) color as a hex string.


## Returns


`float`  
The APCA Lc contrast value. Higher absolute values indicate stronger contrast.


## Examples

``` python
>>> contrast_ratio("#000000", "#FFFFFF")
```

106.04

``` python
>>> contrast_ratio("#FFFFFF", "#000000")
```

-107.88
