|
|
#1 |
|
not fucked, not quite.
(Forum King) |
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; |
|
|
|
|
|
#2 |
|
Member
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! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|