Skip to content

color object ​

Last updated View as Markdown

Information about a color.

When the liquid engine encounters an invalid Hex6 or Hex8 (RGBA) color value, it defaults to #000000FF.

Properties ​


NameTypeDescription
hexstringColor Hex
rednumberThe red component of the color, which is a number between 0 and 255.
greennumberThe green component of the color, which is a number between 0 and 255.
bluenumberThe blue component of the color, which is a number between 0 and 255.
alphanumberThe alpha component of the color, which is a decimal number between 0.0 and 1.0.
huenumberThe hue component of the color, which is a number between 0 and 360.
saturationnumberThe saturation component of the color, which is a number between 0 and 100.
lightnessnumberThe lightness component of the color, which is a number between 0 and 100.
oklch_huenumberThe hue of the color in the OKLCH color space, which is a decimal number between 0 and 360.
chromanumberThe chroma of the color in the OKLCH color space, which is a decimal number from 0.
liquid
{% assign color = settings.accent_color %}
--accent-rgb: {{ color.red }}, {{ color.green }}, {{ color.blue }};
--accent-hsl: {{ color.hue }}, {{ color.saturation }}%, {{ color.lightness }}%;
--accent-oklch: 70% {{ color.chroma }} {{ color.oklch_hue }};

Output

css
--accent-rgb: 122, 181, 92;
--accent-hsl: 99, 37%, 53%;
--accent-oklch: 70% 0.135657 135.9957;