# Generating clouds with perlin noise

**URL:** https://forum.kirupa.com/t/generating-clouds-with-perlin-noise/249294
**Category:** flash
**Created:** [January 17, 2008, 10:47am UTC](https://forum.kirupa.com/t/generating-clouds-with-perlin-noise/249294 "2008-01-17T10:47:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anon4341189](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@anon4341189](https://forum.kirupa.com/u/anon4341189)
#### Post date: [January 17, 2008, 10:47am UTC](https://forum.kirupa.com/t/generating-clouds-with-perlin-noise/249294/1 "2008-01-17T10:47:33Z")

</div>

Hi guys,

I am trying to generate some clouds with the perlin noise function.  
Currently, i have the follow:

```auto

var channel:uint = 1 | 2 | 4 | 8;
var xpos:Number = Math.floor(Math.random()*100);
var ypos:Number = Math.floor(Math.random()*100);
var seed:Number = Math.floor(Math.random()*100);
var p:Point = new Point(xpos, ypos);
var offsetArray:Array = [p, p, p, p, p];

var bitmap:BitmapData = new BitmapData(300, 300, true, 0xFFFFFFFF);
bitmap.perlinNoise(300, 300, 10, seed, false, true, channel, false, offsetArray);

```

With this, I get a cloud like bitmap, but i have all the colors in it (red blue and green). What i’d like to do is have a blue background and white clouds.

How would i go about doing that?

Thanks
