Why does a gradient between two vivid colors turn gray in the middle?
Because the default linear interpolation in sRGB mixes the R, G and B channels along a straight line, and that straight line can pass through a low-saturation region of the color space even when both endpoints are highly saturated. Switching the interpolation space to oklab or oklch, which follow a curve closer to human perception, avoids that dip.
What is the difference between linear, radial and conic gradients?
Linear follows a straight axis at a fixed angle, radial spreads from a center point in a circle or ellipse to a defined edge (closest side, farthest side, closest corner, farthest corner), and conic sweeps around a point like clock hands, the only one of the three that can form a full circle of color without repeating.
What does "in oklch" mean inside a CSS gradient?
It is the interpolation space clause from CSS Color 4: instead of mixing colors in sRGB (the default), the browser computes the intermediate steps in OKLCH, a more perceptually uniform space, which tends to avoid gray bands and produce transitions closer to what the eye expects.
Do SVG gradients use the same syntax as CSS?
Not directly: SVG defines gradients as their own elements, `<linearGradient>` with x1/y1/x2/y2 attributes and `<radialGradient>` with cx/cy/r, each containing `<stop offset="..." stop-color="..." stop-opacity="...">` children, instead of the compact function syntax used in CSS; the concept of color stops is the same, the markup syntax is different.