CSS variable calculation of HSL values
问题 I want to have a basic HSL color value which I want to implement as a gradient as follows: :root { --hue: 201; --saturation: 31; --lightness: 40; --mainColor: hsl(var(--hue),var(--saturation),var(--lightness)); --difference: 20; /* 0 + --difference < --lightness < 100 - --difference */ --lightnessPlus: calc(var(--lightness) + var(--difference)); --colorFrom: hsl(var(--hue),var(--saturation),var(--lightnessPlus)); --lightnessMinus: calc(var(--lightness) - var(--difference)); --colorTo: hsl(var