As Byte '1byte unsigned char 青 0~255 rgbGreen As Byte '1byte unsigned char 緑 0~255 rgbRed As Byte '1byte unsigned char 赤 0~255 End Type Function 認定黒(RBG As DEF_RGBQUAD24) As Boolean 認定黒 = False If RBG.rgbRed >= 0 And RBG.rgbRed <= 72 _ And RBG.rgbGreen >= 0 And RBG.rgbGreen <= 60 _ And RBG.rgbBlue >= 0 And RBG.rgbBlue <= 100 Then 認定黒 = True End If End Function 判定ロジック