Go Back   Winamp Forums > Visualizations > MilkDrop > MilkDrop Presets

Reply
Thread Tools Search this Thread Display Modes
Old 26th May 2004, 18:10   #1
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,755
Send a message via AIM to ryan
Random Colours

I'm trying to make random colours on preset init. I'm having problems with it though.

I can't find a way to get a random number between 0 and 1, since rand(1) dosen't go between the numbers (.1, .2, .3 etc). And I'm also having a problem keeping all the numbers from being 0 and all of the numbers from being 1.

Here is what I have so far.

edit: Zylot says rand(100) * .01;
Attached Files
File Type: zip idiot - random init colours.zip (1.8 KB, 56 views)
ryan is offline   Reply With Quote
Old 26th May 2004, 20:50   #2
PieturP
Member
 
PieturP's Avatar
 
Join Date: Mar 2004
Location: Amsterdam, The Netherlands
Posts: 91
Try my HSL to RGB functions! (You can for example get a bright, but random colour, or a very-low-saturation random colour!) (or even randomize between ofcourse)

Use it like:

h=rand(1000)*.001; // hue
s=1; // saturation
l=1; // luminance

For examples: see my HSL presets in my 80presets pack!
PieturP is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Visualizations > MilkDrop > MilkDrop Presets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump