Shape images with CSS: arches, blobs and clip-path
Arches, hexagons, diagonals, blobs and waves: how to shape images with border-radius, clip-path and mask, keep a gallery consistent, and add a shadow that follows the shape.
Tag
11 articles
Arches, hexagons, diagonals, blobs and waves: how to shape images with border-radius, clip-path and mask, keep a gallery consistent, and add a shadow that follows the shape.
A before and after image slider needs no library: two stacked images, clip-path: inset() and a native range input. Here is the full code, how to make it accessible, and how to line the images up.
How palette extractors pick colours from a photo with k-means clustering, why they miss small accent colours, and how to turn the result into an accessible web palette.
Organic blob shapes need only one line of CSS. How the eight-value border-radius syntax works, which values look good, how to animate a morphing blob, and when to use SVG instead.
What every letter in an SVG path's d attribute means: move, line, cubic and quadratic curves, arcs and close path, absolute versus relative coordinates, and how the arc flags work.
A squircle is a rounded square with corners that ease into the edges. Here is how to make one in CSS with corner-shape, an SVG mask or clip-path, and how much smoothing to use.
WCAG asks for 4.5:1 contrast for normal text and 3:1 for large text at level AA. Here is what each rule covers, how the ratio is calculated, and the exceptions.
OKLCH lets you build colour palettes with evenly spaced shades and predictable contrast. Here is the syntax, an 11-step scale with real contrast results, and how to use it safely.
Three soft UI styles built from CSS shadows and filters. Here is how glassmorphism, neumorphism and claymorphism differ, where each works, and how to keep them accessible.
Enjoying Refract Tools? ☕️
Refract is a personal project built to make design and development a little easier, with practical, intuitive tools that help you work smarter, without AI doing the work for you.
If you find the tools useful, consider buying me a coffee. Every bit of support helps me keep building, improving, and sharing more free tools with the community.
Thanks for being here! ❤️
Buy me a coffee