Skip to content

Color Contrast ​

Last updated View as Markdown

You get the contrast ratio between two colors, from 1 to 21, rounded to one decimal.

Example ​

liquid
{{ '#495859' | color_contrast: '#fffffb' }}

Output

html
7.4