How would I set 3 numbers to be the RBG to be the selected color? It only allows me to set the red number.
Printable View
How would I set 3 numbers to be the RBG to be the selected color? It only allows me to set the red number.
I just realized that this object does not have 3 numbers, rather just one very large number. How would I slowly go from one color to another by changing a single number?
MMF has the following functions:
Getrgb(red,green,blue)
(converts the diffrent colors into one 'big number')
getred(bignumber)
(gets the red value out of the big number)
getgreen(bignumber)
(gets the red value out of the big number)
getblue(bignumber)
(gets the red value out of the big number)
so to change the red value by +1 use:
getrgb(getred('big number')+1,getgreen('big number'),getblue('big number'))
Hope that makes sense :grin:
Good info Seele. Skeets, I have an example on my website that uses the draw object. The collors are selected by Keys. The example is called Houses and Utilities. It may help.
Marv
seele (cool name) whilst you may be correct if you use such mmf functions you will only be wasting time , i find it easier to change the way mmf functions , in this case i have used the following code to change the way mmf works , and you will never have to use such stupid codes such as seeles
If r > g And _
r > b Then
picTextAt.PSet (x, y), RGB(255, 0, 0)
ElseIf g > r And _
g > b Then
picTextAt.PSet (x, y), RGB(0, 255, 0)
ElseIf b > red And _
b > g Then
picTextAt.PSet (x, y), RGB(0,0, 255)
End If
please seele get a life
Hi Rayanami. Your psuedo code should just be broken down in MMF code to help beginners, and veterans alike. IMHO, Seely has been on these forums a long time, and has helped many forum members, and answered hundreds of questions.
It would probably be best to PM Seeley for little unfair snippets like you made about his life.
Marv
This is a very rude post. Seele has been a very helpful asset to us for many years. If you code differently then someone else, that's fine. Don't be so snotty. In my opinion, Seele's code is easier and more efficient.Quote:
Originally Posted by Rayanami
stephen1980