RANDHATCH – Fill Closed Shapes with Random Colors (Free AutoCAD LISP)

14th September 2026

FREE AUTOCAD LISP

RANDHATCH — every shape a different color, in one selection

Select your closed shapes, and each one gets a solid hatch in its own random color. Plots, zones, rooms, parcels, mosaic patterns — one command and the whole drawing reads at a glance.

The colors are not just random: the hue steps around the wheel by the golden angle, so neighboring shapes never come out in near-identical tones, and saturation and brightness are held in a range that never produces black, white or gray. Every hatch is sent to the back of the draw order, so your boundary lines, text and dimensions stay on top.

Only what you select gets filled — as the demo shows, the window selection catches the cells it encloses and the rest stay clear. The pattern itself was generated with our Voronoi Generator add-on; RANDHATCH then colored every selected cell in one go.

RANDHATCH free AutoCAD LISP filling Voronoi cells with random colors

How to use it

  1. Unzip, then load the .lsp with APPLOAD.
  2. Type RANDHATCH.
  3. Select the closed shapes — polylines, circles, ellipses, closed splines or regions. Open objects in the selection are simply skipped.
  4. Press Enter. Every selected shape is filled, and the command line reports how many.
  5. Don’t like the result? One U undoes the entire run.

Good to know

Works on Closed polylines, circles, ellipses, closed splines and regions – open objects are skipped and counted
Colors True-color RGB, hue stepped by the golden angle so neighbors differ clearly; never black, white or gray
Hatch SOLID, non-associative, one per shape, placed at the BACK of the draw order so boundaries stay visible
Safety A self-intersecting or unhatchable boundary is rolled back and reported, not left half-done
Undo The whole run is one undo mark – a single U reverses everything
Command RANDHATCH

From the same workshop — watch what the paid add-ons do

Divide Area for AutoCAD - product boxDivide Area add-on slicing an AutoCAD shape into equal strips

Divide Area
Split any closed shape into pieces of equal area – by number, by distance, a set area or a free cut.

See Divide Area$21.90

Area Measure for AutoCAD - product boxArea Measure add-on numbering AutoCAD polygons and inserting a totalled area table

Area Measure
Measure closed shapes in any unit, number them, and get a totalled area table – annotative text supported.

See Area Measure$21.90

PlotData for AutoCAD - product boxPlotData numbering parcel corners in AutoCAD and inserting the coordinate table

PlotData
Number every parcel corner, label every side length and azimuth, and insert the coordinate table – one selection.

See PlotData$19.90

Voronoi Generator for AutoCAD - product boxVoronoi Generator filling a closed AutoCAD polyline with organic cells

Voronoi Generator
Fill any closed polyline with Voronoi cells – exact spacing, edge distance and rounding, live preview.

See Voronoi Generator$24.90

AUTODIM for AutoCAD - product box
Automatic Dimension — AutoCAD Add-in
AUTODIM
Length on every line, polyline and arc you select – as a real dimension or as text, with the layer name above it. Break at turns, at crossings, or total a whole object including its bends.

See AUTODIM$29

Contour Generator turning Google Earth ground into survey contour lines, a 3D terrain model and a printed contour sheet
WEB TOOL — NOTHING TO INSTALL
KIM Contour Generator
Draw a field in your browser, or import a KML from Google Earth, and get survey contours in a minute — scaled PDF, DXF in real UTM, plus STEP and STL of the terrain.

See Contour Generator$60

This tool is part of our free AutoCAD LISP collection — 20+ routines, all free, all tested on real projects.