- Home
·
- Graphics
·
- Darkens/Lightens a color by percentage. Go to http://gameday.de/galaxy/ to help in the beta-testing
Darkens/Lightens a color by percentage. Go to http://gameday.de/galaxy/ to help in the beta-testing
Darkens/Lightens a color by percentage. Go to https://gameday.de/galaxy/ to help in the beta-testing of a game designed in vb 6.0 - Galaxy.
Rate Darkens/Lightens a color by percentage. Go to http://gameday.de/galaxy/ to help in the beta-testing
(2(2 Vote))
Dim r1 As Long
Dim g1 As Long
Dim b1 As Long
b1 = color \ 65536
g1 = (color - b1 * 65536) \ 256
r1 = color - b1 * 65536 - g1 * 256
r1 = Abs(r1 * percentage)
g1 = Abs(g1 * percentage)
b1 = Abs(b1 * percentage)
If r1 > 255 Then r1 = 255
If g1 > 255 Then g1 = 255
If b1 > 255 Then b1 = 255
darkenColor = RGB(Int(r1), Int(g1), Int(b1))
End Function
Darkens/Lightens a color by percentage. Go to http://gameday.de/galaxy/ to help in the beta-testing Comments
No comments yet — be the first to post one!
Post a Comment