Hi Dominic,
Using Lutz Roeder's Reflector, I see the following code under
System.Drawing.Color:
''' <summary>Gets the hue-saturation-brightness (HSB) brightness value for
this <see cref="T:System.Drawing.Color"></see> structure.</summary>
''' <returns>The brightness of this <see
cref="T:System.Drawing.Color"></see>. The brightness ranges from 0.0 through
1.0, where 0.0 represents black and 1.0 represents white.</returns>
Public Function GetBrightness() As Single
Dim single1 As Single = (CSng(Me.R) / 255!)
Dim single2 As Single = (CSng(Me.G) / 255!)
Dim single3 As Single = (CSng(Me.B) / 255!)
Dim single4 As Single = single1
Dim single5 As Single = single1
If (single2 > single4) Then
single4 = single2
End If
If (single3 > single4) Then
single4 = single3
End If
If (single2 < single5) Then
single5 = single2
End If
If (single3 < single5) Then
single5 = single3
End If
Return ((single4 + single5) / 2!)
End Function
MSDN article for more info:
http://msdn2.microsoft.com/en-us/library/system.drawing.color.getbrightness.aspx
Hope this information helps,
Chris