---
name: "OleTranslateColor"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/OleTranslateColor"
---

# OleTranslateColor(3w)

## NAME

**OleTranslateColor** (OLEAUT32.421)

## SYNOPSIS

HRESULT OleTranslateColor\
  (\
   OLE\_COLOR *clr*,\
   HPALETTE  *hpal*,\
   COLORREF\* *pColorRef*\
  )

## DESCRIPTION

Convert an **OLE\_COLOR** to a **COLORREF**.

## PARAMS

*clr* **\[In\]**  Color to convert.

*hpal* **\[In\]**  Handle to a palette for the conversion.

*pColorRef* **\[Out\]**  Destination for converted color, or **NULL** to test if the conversion is ok.

## RETURNS

**Success:** **S\_OK**. The conversion is ok, and *pColorRef* contains the converted color if non-NULL.

**Failure:** **E\_INVALIDARG**, if any argument is invalid.

## FIXME

Document the conversion rules.

## IMPLEMENTATION

Declared in **"olectl.h"**.

Implemented in **"dlls/oleaut32/oleaut.c"**.

Debug channel **"ole"**.
