Algorithm to Switch Between RGB and HSB Color Values

后端 未结 6 675
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 08:18

I read the article Algorithm to Switch Between RGB and HSB Color Values

Type RGBColor
     Red As Byte
     Green As Byte
     Blue As Byte
End Type

Type HS         


        
6条回答
  •  孤城傲影
    2020-12-06 08:36

    If you're using .net, why reinvent the wheel?

    Dim c = Color.FromArgb(myRed, myGreen, myBlue)
    Dim h = c.GetHue()
    Dim s = c.GetSaturation()
    Dim b = c.GetBrightness()
    

提交回复
热议问题