Contents

# QBColor Function

Returns the RGB color code of the color passed as a color value through an older MS-DOS based programming system.

### Syntax:

QBColor (ColorNumber As Integer)

### Return type:

Long

### Parameters:

ColorNumber: Any integer expression that specifies the color value of the color passed from an older MS-DOS based programming system.

ColorNumber can be assigned the following values:

0 : Black

1 : Blue

2 : Zelena

3 : Tirkizna

4 : Crvena

5 : Roza

6 : Žuta

7 : Bijela

8 : Siva

9 : Svijetlo plava

10 : Svijetlo zelena

11 : Svijetlo tirkizna

12 : Svijetlo crvena

13 : Svijetlo roza

14 : Svijetlo žuta

15 : Svijetlo bijela

Ova funkcija se koristi samo za konverziju iz starijih MS-DOS BASIC programa koji koriste gore navedene kodove boja. Funkcija vraća dugački cijeli broj koji ukazuje na boju, koja će biti korištena u LibreOffice IDE.

### Error codes:

5 Invalid procedure call

### Example:

    Sub ExampleQBColor
    Dim iColor As Integer
    Dim sText As String
        iColor = 7
        sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) )
        MsgBox stext,0,"Color " & iColor
    End Sub

Please support us!