ok but i have achieved exactly what i want thanks.
I basicaly am drawing a gradient into a bit map and then using getpixel to get a particular colour along the gradient
code has not been polished just for test purposes
Dim myBitmap As Bitmap
Dim G As Object
myBitmap = New Bitmap(450, 40, PixelFormat.Format32bppArgb)
G = Graphics.FromImage(myBitmap)
Dim width_of_form As Integer = Me.ClientSize.Width - 10
Dim the_brush As LinearGradientBrush
the_brush = New LinearGradientBrush(New Point(0, 0), New Point(width_of_form, 0), Color.Red, Color.Blue)
the_brush.WrapMode = WrapMode.Tile
' Define the colors.
Dim color_blend As New ColorBlend
color_blend.Colors = New Color() {Color.Red, Color.Orange, Color.Yellow, Color.GreenYellow, Color.Blue}
color_blend.Positions = New Single() {0.0, 0.3, 0.5, 0.7, 1.0}
the_brush.InterpolationColors = color_blend
the_brush.GammaCorrection = True
'Height = 80
G.FillRectangle(the_brush, New Rectangle(0, 0, 450, 40))
Me.picturebox.Height = 40
Me.picturebox.Width = 450
Me.Width = 450
Me.picturebox.Image = myBitmap
Dim pos As System.Drawing.Point
picturebox.Location() = (pos)
PictureBox1.BorderStyle = BorderStyle.FixedSingle
PictureBox1.Show()
'this is just a test
'x is the temperature times a multiplier ?
Dim x As Integer = 325
Dim y As Integer = 19
Try
Dim colour As Color = myBitmap.GetPixel(x, y)
PictureBox1.BackColor = colour
Catch ex As Exception
Stop
End Try