Desktop Functions:

   Smart Device Functions:

Show Recent Changes
Subscribe (RSS)
Misc. Pages
Helpful Tools
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
colorhlstorgb (shlwapi)
Converts colors from hue-luminance-saturation (HLS) to RGB format.

C# Signature:

static extern int ColorHLSToRGB(int H, int L, int S);

VB.Net Signature:

<System.Runtime.InteropServices.DllImport("shlwapi.dll", EntryPoint:="ColorHLSToRGBW", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Unicode)>
Public Shared Function ColorHLSToRGB(H As Integer, L As Integer, S As Integer) As Integer
End Function

User-Defined Types:


Alternative Managed API:

Do you know one? Please contribute it!



Tips & Tricks:

Please add some!

Sample Code:

  using System;
  using System.Drawing;
  using System.Runtime.InteropServices;
  sealed class Win32
    static extern int ColorHLSToRGB(int H, int L, int S);

    static public System.Drawing.Color HLSToColor(int H,int L,int S)
      // Convert Hue, Luminance, and Saturation values to System.Drawing.Color structure.
      // H, L, and S are in the range of 0-240.
      // ColorHLSToRGB returns a Win32 RGB value (0x00BBGGRR).  To convert to System.Drawing.Color
      // structure, use ColorTranslator.FromWin32.
      return ColorTranslator.FromWin32(ColorHLSToRGB(H,L,S));


Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

Access directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version