Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/Reference/Default/VBA/Information/TranslateColor.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Syntax: **TranslateColor(** *ColorValue* [ **,** *hPalettePtr* ] **)**
*hPalettePtr*
: *optional* A **LongPtr** handle to a palette to use for translation. Defaults to **0**, which selects the default system palette.

The OLE colour format encodes either a literal RGB value or an index into the Windows system palette (such as `&H80000012`, the colour of a button face). **TranslateColor** returns the corresponding plain RGB **Long**, suitable for passing to APIs and properties that expect a true colour value rather than a system-palette reference.
The OLE colour format encodes either a literal RGB value or an index into the Windows system palette (such as `&H80000012`, the colour of button text). **TranslateColor** returns the corresponding plain RGB **Long**, suitable for passing to APIs and properties that expect a true colour value rather than a system-palette reference.

### Example

Expand All @@ -25,7 +25,7 @@ This example translates an OLE system colour to its current RGB value.
```tb check_build
Dim OleColor As Long
Dim RgbColor As Long
OleColor = &H80000012 ' COLOR_BTNFACE — the button face colour.
OleColor = &H80000012 ' COLOR_BTNTEXT — the button text colour.
RgbColor = TranslateColor(OleColor)
```

Expand Down
Loading