'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim cR,cG,cB As Int
End Sub
Sub HSV2RGB(h As Float,s As Float,v As Float)
Dim i As Int
Dim r,g,b As Float
Dim f,p,q,t As Float
If s=0 Then
'achromatic (grey)
r=v
g=v
b=v
Else
h=h/60
i=Floor(h)
f=h-i
p=v*(1-s)
q=v*(1-s*f)
t=v*(1-s*(1-f))
Select i
Case 0:
r=v
g=t
b=p
Case 1:
r=q
g=v
b=p
Case 2:
r=p
g=v
b=t
Case 3:
r=p
g=q
b=v
Case 4:
r=t
g=p
b=v
Case 5:
r=v
g=p
b=q
End Select
End If
cR=Floor(255*r)
cG=Floor(255*g)
cB=Floor(255*b)
End Sub
Sub SetColor(Percent As Float)
'Change background from green to red as time runs low
H=Percent*0.4*360 ' Hue (note 0.4 = Green)
S=0.9 ' Saturation
V=0.9 ' Value
'Call function to convert HSB to RGB values
HSV2RGB.HSV2RGB(H,S,V)
'Modify activity background as time elapses
Activity.Color=Colors.RGB(HSV2RGB.cR,HSV2RGB.cG,HSV2RGB.cB)
End Sub
you need to know their rgb value.@RandomCoder
ok bro, how could i know this number color -6710887 ? red , blue , white , yello ?