NEW · FREE BETA
Hue Haven 2D Garden Designer
Plan your garden to scale with an expanded library of flowers, shrubs, trees, beds, ponds, paving and furniture. Search for plants, customise colours and dimensions, save your plan and download or print it.
Launch the free Garden Designer (Beta)
We would love your feedback as we improve the tool. The original quick planner is still available below.
Your garden, your design
Sketch your dream outdoor space. Add plants, patios, ponds and garden features, move them around, and save your plan.
80 m²
Garden features
Tap to add a feature, then drag it into position.
Selected feature
Use arrow keys when a feature or plan is focused. Grid lines represent metres (or larger intervals for big gardens).
Garden plan
Tap a feature to select it. Drag to move it. Your garden is shown from above.
(function(){'use strict';var root=document.getElementById('hh-garden');if(!root||root.dataset.ready)return;root.dataset.ready='yes';var $=function(id){return root.querySelector('#hh-'+id)},c=$('canvas'),ctx=c.getContext('2d'),W=10,L=8,items=[],sel=null,seq=0,history=[],drag=null,storage='hue-haven-garden-v1';var types={lawn:['Lawn','🌱',4,3,'#8eb767'],patio:['Patio','▦',3,3,'#d0b293'],path:['Path','▪',1,4,'#c8ba9e'],bed:['Flower bed','🌷',3,1,'#a97952'],tree:['Tree','🌳',2,2,'#467d45'],pond:['Pond','💧',2,1.5,'#6ba7b6'],shed:['Shed','🏠',2.5,2,'#a18465'],deck:['Decking','▤',3,2.5,'#b78b59'],pergola:['Pergola','⌂',3,3,'#a3815d'],seat:['Seating','🪑',1.5,1,'#97704b'],veg:['Veg patch','🥬',2,1.5,'#8a6747'],hedge:['Hedge','🌿',4,.75,'#537f46']};var msg=function(t){$('message').textContent=t};function snap(){return JSON.stringify({W:W,L:L,items:items,sel:sel})}function remember(){history.push(snap());if(history.length>45)history.shift();$('undo').disabled=false}function clamp(v,a,b){return Math.max(a,Math.min(b,v))}function current(){return items.find(function(o){return o.id===sel})}function fit(o){o.w=clamp(o.w,.25,W);o.h=clamp(o.h,.25,L);o.x=clamp(o.x,0,W-o.w);o.y=clamp(o.y,0,L-o.h)}function geom(){var s=Math.min(800/W,535/L);return {s:s,x:(900-W*s)/2,y:55+(535-L*s)/2,w:W*s,h:L*s}}function rounded(x,y,w,h,r,col){ctx.fillStyle=col;ctx.beginPath();ctx.roundRect(x,y,w,h,Math.min(r,w/2,h/2));ctx.fill()}function circle(x,y,r,col){ctx.beginPath();ctx.arc(x,y,r,0,Math.PI*2);ctx.fillStyle=col;ctx.fill()}function draw(exporting){var g=geom(),s=g.s;ctx.clearRect(0,0,900,650);ctx.fillStyle='#f2f5ed';ctx.fillRect(0,0,900,650);ctx.fillStyle='#254b38';ctx.font='bold 18px system-ui';ctx.fillText('HUE HAVEN | Garden plan',20,27);ctx.font='bold 15px system-ui';ctx.textAlign='right';ctx.fillText('N ↑',875,27);ctx.textAlign='center';ctx.fillStyle='#415744';ctx.fillText(W+' m',450,g.y-9);ctx.save();ctx.translate(g.x-15,g.y+g.h/2);ctx.rotate(-Math.PI/2);ctx.fillText(L+' m',0,0);ctx.restore();ctx.fillStyle='#cbdcaa';ctx.fillRect(g.x,g.y,g.w,g.h);ctx.strokeStyle='#aabb9a';ctx.lineWidth=1;var step=Math.max(1,Math.ceil(Math.max(W,L)/20));for(var x=step;W>x;x+=step){ctx.beginPath();ctx.moveTo(g.x+x*s,g.y);ctx.lineTo(g.x+x*s,g.y+g.h);ctx.stroke()}for(var y=step;L>y;y+=step){ctx.beginPath();ctx.moveTo(g.x,g.y+y*s);ctx.lineTo(g.x+g.w,g.y+y*s);ctx.stroke()}ctx.strokeStyle='#5e7956';ctx.lineWidth=3;ctx.strokeRect(g.x,g.y,g.w,g.h);ctx.save();ctx.beginPath();ctx.rect(g.x,g.y,g.w,g.h);ctx.clip();items.forEach(function(o){var t=types[o.type],x=g.x+o.x*s,y=g.y+o.y*s,w=o.w*s,h=o.h*s;ctx.save();if(o.type==='tree'||o.type==='pond'){ctx.beginPath();ctx.ellipse(x+w/2,y+h/2,w/2,h/2,0,0,Math.PI*2);ctx.fillStyle=t[4];ctx.fill();if(o.type==='tree'){circle(x+w*.36,y+h*.39,Math.min(w,h)*.24,'#79a75b');circle(x+w*.66,y+h*.57,Math.min(w,h)*.23,'#59924d')}else{ctx.strokeStyle='#bde1df';ctx.lineWidth=2;ctx.beginPath();ctx.ellipse(x+w/2,y+h/2,w*.37,h*.33,0,0,Math.PI*2);ctx.stroke()}}else{rounded(x,y,w,h,Math.min(8,w/5,h/5),t[4]);ctx.strokeStyle='#ffffff66';ctx.lineWidth=1;if(o.type==='patio'||o.type==='path'||o.type==='deck'){var every=Math.max(8,s*.5);for(var i=every;w>i;i+=every){ctx.beginPath();ctx.moveTo(x+i,y);ctx.lineTo(x+i,y+h);ctx.stroke()}if(o.type!=='deck')for(var j=every;h>j;j+=every){ctx.beginPath();ctx.moveTo(x,y+j);ctx.lineTo(x+w,y+j);ctx.stroke()}}if(o.type==='bed'||o.type==='veg'||o.type==='hedge'){for(var k=0;Math.min(12,Math.max(2,Math.floor(w/18)))>k;k++){circle(x+(k+.5)*w/Math.min(12,Math.max(2,Math.floor(w/18))),y+h*.46,Math.min(8,h*.23),o.type==='bed'?['#e9a9b7','#f7df87','#a7ce81'][k%3]:'#a5cf78')}}if(o.type==='shed'){ctx.strokeStyle='#654c38';ctx.lineWidth=3;ctx.beginPath();ctx.moveTo(x,y+h/2);ctx.lineTo(x+w,y+h/2);ctx.stroke()}if(o.type==='pergola'){ctx.strokeStyle='#725438';ctx.lineWidth=3;ctx.strokeRect(x+4,y+4,Math.max(0,w-8),Math.max(0,h-8))}}if(w>40&&h>24){ctx.font='bold '+Math.min(15,Math.max(10,w/8))+'px system-ui';ctx.textAlign='center';ctx.textBaseline='middle';ctx.lineWidth=3;ctx.strokeStyle='#193d2d';ctx.strokeText(t[0],x+w/2,y+h/2);ctx.fillStyle='#fff';ctx.fillText(t[0],x+w/2,y+h/2)}if(!exporting&&o.id===sel){ctx.strokeStyle='#fff';ctx.lineWidth=5;ctx.strokeRect(x,y,w,h);ctx.strokeStyle='#13452e';ctx.lineWidth=2;ctx.setLineDash([6,4]);ctx.strokeRect(x,y,w,h);ctx.setLineDash([])}ctx.restore()});ctx.restore();ctx.textAlign='left';ctx.textBaseline='alphabetic';ctx.font='14px system-ui';ctx.fillStyle='#526751';ctx.fillText('Grid: '+step+' m · '+(W*L).toFixed(1).replace(/\.0$/,'')+' m² · '+items.length+' features',20,630);$('scale').textContent='Grid: '+step+' m';$('area').textContent=Number((W*L).toFixed(2))+' m²';$('featurecount').textContent=items.length+' feature'+(items.length===1?'':'s')}function sync(){var o=current();$('selected').textContent=o?types[o.type][0]+' · '+o.w+' × '+o.h+' m':'Choose a feature on your plan.';['fw','fl','resize','rotate','copy','delete'].forEach(function(id){$(id).disabled=!o});$('fw').value=o?o.w:'';$('fl').value=o?o.h:'';$('undo').disabled=!history.length;draw()}function add(type){remember();var t=types[type],o={id:++seq,type:type,x:(W-t[2])/2+.3*(items.length%4),y:(L-t[3])/2+.3*(items.length%4),w:t[2],h:t[3]};fit(o);items.push(o);sel=o.id;sync();msg(t[0]+' added — drag to position.')}Object.keys(types).forEach(function(type){var b=document.createElement('button');b.type='button';var span=document.createElement('span');span.textContent=types[type][1];b.appendChild(span);b.appendChild(document.createTextNode(types[type][0]));b.addEventListener('click',function(){add(type)});$('palette').appendChild(b)});function valid(v,min,max){return Number.isFinite(v)&&v>=min&&max>=v}$('apply').onclick=function(){var w=Number($('width').value),l=Number($('length').value);if(!valid(w,2,100)||!valid(l,2,100)){msg('Please enter dimensions from 2 to 100 metres.');return}remember();W=w;L=l;items.forEach(fit);sync();msg('Garden dimensions updated.')};$('resize').onclick=function(){var o=current(),w=Number($('fw').value),h=Number($('fl').value);if(!o||!valid(w,.25,W)||!valid(h,.25,L)){msg('Enter sizes that fit inside the garden.');return}remember();o.w=w;o.h=h;fit(o);sync()};$('rotate').onclick=function(){var o=current();if(o){remember();var w=o.w;o.w=o.h;o.h=w;fit(o);sync()}};$('copy').onclick=function(){var o=current();if(o){remember();var n=Object.assign({},o,{id:++seq,x:o.x+.4,y:o.y+.4});fit(n);items.push(n);sel=n.id;sync()}};$('delete').onclick=function(){if(current()){remember();items=items.filter(function(o){return o.id!==sel});sel=null;sync();msg('Feature removed.')}};function point(e){var r=c.getBoundingClientRect(),g=geom();return {x:((e.clientX-r.left)*900/r.width-g.x)/g.s,y:((e.clientY-r.top)*650/r.height-g.y)/g.s}}c.addEventListener('pointerdown',function(e){var p=point(e);var o=items.slice().reverse().find(function(a){return p.x>=a.x&&a.x+a.w>=p.x&&p.y>=a.y&&a.y+a.h>=p.y});sel=o?o.id:null;sync();if(o){c.setPointerCapture(e.pointerId);drag={o:o,dx:p.x-o.x,dy:p.y-o.y,recorded:false};e.preventDefault();c.focus({preventScroll:true})}});c.addEventListener('pointermove',function(e){if(!drag)return;var p=point(e);if(!drag.recorded){remember();drag.recorded=true}drag.o.x=Math.round((p.x-drag.dx)*4)/4;drag.o.y=Math.round((p.y-drag.dy)*4)/4;fit(drag.o);draw()});function stop(){if(drag){drag=null;sync()}}c.addEventListener('pointerup',stop);c.addEventListener('pointercancel',stop);c.addEventListener('keydown',function(e){var o=current(),d={ArrowLeft:[-.25,0],ArrowRight:[.25,0],ArrowUp:[0,-.25],ArrowDown:[0,.25]}[e.key];if(o&&d){e.preventDefault();remember();o.x+=d[0];o.y+=d[1];fit(o);sync()}});function restore(data){W=data.W;L=data.L;items=data.items;sel=data.sel||null;seq=Math.max(seq,0,...items.map(function(o){return o.id}));$('width').value=W;$('length').value=L;sync()}$('undo').onclick=function(){if(history.length){restore(JSON.parse(history.pop()));msg('Last change undone.')}};$('clear').onclick=function(){if(items.length&&window.confirm('Clear this garden plan? You can undo this.')){remember();items=[];sel=null;sync();msg('Garden cleared.')}};$('example').onclick=function(){if(items.length&&!window.confirm('Replace the current plan with an example? You can undo this.'))return;remember();W=10;L=8;items=[];[['lawn',1,1,6,4],['patio',6.4,4.2,3.6,3.8],['bed',0,0,10,.8],['tree',7.7,1,2,2],['pond',.5,5.7,2.5,1.7],['veg',3.8,6,2,1.5],['path',5.9,1,1,5],['seat',7.5,5.4,1.5,1]].forEach(function(a){items.push({id:++seq,type:a[0],x:a[1],y:a[2],w:a[3],h:a[4]})});sel=null;restore({W:W,L:L,items:items});msg('Example garden loaded — make it your own.')};$('save').onclick=function(){try{localStorage.setItem(storage,snap());msg('Design saved on this device.')}catch(e){msg('Device storage is unavailable. You can still download a picture.')}};$('load').onclick=function(){try{var raw=localStorage.getItem(storage);if(!raw){msg('No saved garden found on this device.');return}var data=JSON.parse(raw);if(!valid(data.W,2,100)||!valid(data.L,2,100)||!Array.isArray(data.items)||data.items.some(function(o){return !types[o.type]||!Number.isFinite(o.x)||!Number.isFinite(o.y)||!Number.isFinite(o.w)||!Number.isFinite(o.h)}))throw Error('invalid');if(items.length&&!window.confirm('Replace this plan with your saved design?'))return;remember();restore(data);msg('Saved design loaded.')}catch(e){msg('Unable to load a saved garden.')}};$('download').onclick=function(){draw(true);c.toBlob(function(blob){draw();if(!blob){msg('Picture export unavailable.');return}var a=document.createElement('a'),u=URL.createObjectURL(blob);a.href=u;a.download='hue-haven-garden-plan.png';document.body.appendChild(a);a.click();a.remove();setTimeout(function(){URL.revokeObjectURL(u)},3000);msg('Garden picture downloaded.')},'image/png')};sync()})();