Color luminance and contrast
color_infoParse hex, RGB, or HSL colors to get hex, RGB, HSL, OKLCH, luminance, auto-generated names, and WCAG contrast ratios against white, black, or a second color.
Instructions
Parse a color the way the site does and return hex, rgb, hsl, oklch, its luminance (the site's color value, 0-100), the site's auto name, and WCAG contrast ratios against white, black and an optional second color.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | Hex, rgb(...) or hsl(...). | |
| against | No | Optional second color for a contrast ratio. |