Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


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

Search Results for "RGB" in [All]

comdlg32

.

     public int rgbColors;

advapi32

.

        public byte[] rgbHashOfCert;

.

        public byte[] rgbHashOfCert;

.

        certInfo.rgbHashOfCert = certCredential.Certificate.GetCertHash();

shlwapi

.
Summary
Converts colors from hue-luminance-saturation (HLS) to RGB format.
.

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

.

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

.

      // ColorHLSToRGB returns a Win32 RGB value (0x00BBGGRR).  To convert to System.Drawing.Color

.

      return ColorTranslator.FromWin32(ColorHLSToRGB(H,L,S));

.
Documentation
[ColorHLSToRGB] on MSDN
.
Summary
Converts colors from RGB to hue-luminance-saturation (HLS) format.
.

static extern void ColorRGBToHLS(int RGB, ref int H, ref int L, ref int S);

.

    static extern void ColorRGBToHLS(int RGB, ref int H, ref int L, ref int S);

.

      //Use ColorTranslator.ToWin32 rather than Color.ToArgb because we need 0x00BBGGRR,

.

      //which is returned by ToWin32, rather than 0x00RRGGBB, which is returned by ToArgb.

.

      ColorRGBToHLS(ColorTranslator.ToWin32(C), ref H, ref L, ref S);

.
Documentation
[ColorRGBToHLS] on MSDN

comctl32

.

static extern bool ImageList_DrawEx(IntPtr himl, int i, IntPtr hdcDst, int x, int y, int dx, int dy, int rgbBk, int rgbFg, int fStyle);

.

    dy As Integer, rgbBk As Integer, rgbFg As Integer, fStyle As Integer) As Boolean

.

// Use for rgbBk and rgbFg parameters (see documentation for meaning)

.

       public extern static bool ImageList_DrawEx(IntPtr himl, int i, IntPtr hdcDst, int x, int y, int dx, int dy, uint rgbBk, uint rgbFg, ImageListDrawingStyle fStyle);

.

       public extern static bool ImageList_DrawEx(IntPtr himl, int i, IntPtr hdcDst, int x, int y, int dx, int dy, uint rgbBk, uint rgbFg, ImageListDrawingStyle fStyle);

gdi32

.
Summary
Determines whether a specified set of RGB triples lies in the output gamut of a specified device.
.

static extern bool CheckColorsInGamut(IntPtr hDC, IntPtr lpRGBTriples,

.

            SetPixel(hdc, x, y, (uint)Color.Black.ToArgb());

.
    • An array of RGBQUAD. The elements of the array that make up the color table.
.

  // Print out the RGB value of the pixel which is under the mouse cursor.

.

    Color color = Color.FromArgb((int)pixel);

.

    Color color = Color.FromArgb((cr & 0x000000FF),

.

       Color color = Color.FromArgb((int)(pixel & 0x000000FF),

.

    public static int RGB(Color color)

.

        return color.ToArgb() & 0xffffff;

.

        IntPtr thePen = GDI32.CreatePen(0, 1, (uint)GDI32.RGB(Color.White));

.

        IntPtr theBrush = GDI32.CreateSolidBrush((uint)GDI32.RGB(Color.White));

.

public int ColorToRGB(Color crColor)

.

    SetPixel(vGraphics.GetHdc(), 10, 10, ColorToRGB(Color.Red));

.

          ByVal prmlngRGB As Long) As Long

kernel32

.

        return System.Drawing.Color.FromArgb((int)(0x000000FFU & ColorDWORD),

.

  Dim BmpCopy As Bitmap = New Bitmap(Width, Height, PixelFormat.Format32bppArgb)

.

            return Color.FromArgb((int)(0x000000FFU & ColorDWORD),

.

        info.ColorTable[0] = RGB(0, 0, 200);

.

        info.ColorTable[7] = RGB(200, 200, 0);

.

    // Set a specific console color to an RGB color

.

        // Note: If you use SetScreenColors, the RGB values of gray and black are changed permanently for the console window.

Constants

18: LR_
.

    /// Dk Gray, RGB(128,128,128) COLOR_3DSHADOW

.

    /// Gray, RGB(192,192,192) COLOR_3DFACE

.

    /// Lt Gray, RGB(223,223,223) COLOR_3DLIGHT

.

    ''' Dk Gray, RGB(128,128,128) COLOR_3DSHADOW

.

    ''' Gray, RGB(192,192,192) COLOR_3DFACE

.

    ''' Lt Gray, RGB(223,223,223) COLOR_3DLIGHT

.

    public static PropertyKey WPD_STILL_IMAGE_RGB_GAIN = new PropertyKey(0x58C571EC, 0x1BCB, 0x42A7, 0x8A, 0xC5, 0xBB, 0x29, 0x15, 0x73, 0xA2, 0x60, 6);

.

    SRGB = 1,

.

    RGB = 2,

coredll

.

static extern int SetSysColors(int cElements, Int32[] lpaElements, Int32[] lpaRgbValues);

.

Public Shared Function SetSysColors(ByVal cElements As Integer, ByRef lpaElements As Integer(), ByRef lpaRgbValues As Integer()) As Integer

.

    /// <param name="lpaRgbValues"></param>

.

    private static extern bool SetSysColors(int cElements, Int32[] lpaElements, Int32[] lpaRgbValues);

.

        int[] lpaRgbValues =

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_SCROLLBAR

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_BACKGROUND

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_ACTIVECAPTION

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_INACTIVECAPTION

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_MENU

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_WINDOW

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_WINDOWFRAME

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_MENUTEXT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_WINDOWTEXT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_CAPTIONTEXT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_ACTIVEBORDER

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_INACTIVEBORDER

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_APPWORKSPACE

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_HIGHLIGHT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_HIGHLIGHTTEXT

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_BTNFACE

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_BTNSHADOW

.

            Color.Turquoise.ToArgb() & 0x00ffffff,       //COLOR_GRAYTEXT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_BTNTEXT

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_INACTIVECAPTIONTEXT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_BTNHIGHLIGHT

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_3DDKSHADOW

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_3DLIGHT

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_INFOTEXT

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_INFOBK

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_STATIC

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_STATICTEXT

.

            Color.Transparent.ToArgb() & 0x00ffffff,     //COLOR_GRADIENTACTIVECAPTION

.

            Color.Transparent.ToArgb() & 0x00ffffff      //COLOR_GRADIENTINACTIVECAPTION

.

        bool retVel = cSystemColors.SetSysColors(iElements, lpaElements, lpaRgbValues);

user32

.

'GetSysColor returns in BGR byte order NOT RGB

.

Dim colorDT as Color = Color.FromARGB(i and &HFF, (i and &HFF00) >> 8, (i and &HFF0000) >> 16)

.

   uint [] lpaRgbValues);

.

public static extern bool SetSysColors(int cElements, int [] lpaElements, int [] lpaRgbValues);

.

        if (bitmap.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb)

.

            hBitmap = bitmap.GetHbitmap(Color.FromArgb(0));

Interfaces

.

    int SetWorkItemData(  ushort cbData,    Byte[] rgbData);

.

    int GetWorkItemData(  out ushort cbData,out Byte[] rgbData);

.

        WTSAT_RGB = 1,

.

        WTSAT_ARGB = 2,

.

        WTSAT_RGB = 1

.

        WTSAT_ARGB = 2

opengl32

.

        GL_RGBA_MODE = 0x0C31,

.

        GL_RGB = 0x1907,

.

        GL_RGBA = 0x1908,

.

        GL_RGB4 = 0x804F,

.

        GL_RGB5 = 0x8050,

.

        GL_RGB8 = 0x8051,

.

        GL_RGB10 = 0x8052,

.

        GL_RGB12 = 0x8053,

.

        GL_RGB16 = 0x8054,

.

        GL_RGBA2 = 0x8055,

.

        GL_RGBA4 = 0x8056,

.

        GL_RGB5_A1 = 0x8057,

.

        GL_RGBA8 = 0x8058,

.

        GL_RGB10_A2 = 0x8059,

.

        GL_RGBA12 = 0x805A,

.

        GL_RGBA16 = 0x805B,

winscard

.

  if (ret == 0 && rs[0].cbAtr > 0 && rs[0].rgbAtr != null)

.

   Array.Copy(rs[0].rgbAtr, atr, rs[0].cbAtr);

.

    internal byte[] rgbAtr;

hhctrl

.

            int lRGB = aValue.ToArgb();

.

            int n0 = (lRGB & 0xff) << 16;

.

            lRGB = lRGB & 0xffff00;

.

            lRGB = (lRGB | (lRGB >> 16 & 0xff));

.

            lRGB = (lRGB & 0xffff);

.

            lRGB = (lRGB | n0);

.

            _ColorRef = (uint)lRGB;

.

        public COLORREF(int lRGB)

.

            _ColorRef = (uint)lRGB;

.

            return Color.FromArgb(r, g, b);

.

    Color back_сolor_for_popup_window = Color.FromArgb(255, 255, 192); // yellow background, as in windows

gdiplus

.

   out int argb);

.

static extern int GdipBitmapSetPixel(HandleRef bitmap, int x, int y, int argb);

shell32

.

    public int rgbBk;

.

    public int rgbFg;

Structures

.

        /// the RGB format.

.

        ''' capturing in the RGB format.

.
Summary
The COLORREF value is used to specify or retrieve an RGB color.
.

      return System.Drawing.Color.FromArgb((int) (0x000000FFU & ColorDWORD),

.

        public int rgbBk;

.

        public int rgbFg;

.

        Public rgbBk As Integer

.

        Public rgbFg As Integer

.

   public UInt32        lbColor;    //colorref RGB(...)

.

   [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public byte [] rgbReserved;

.

    Public rgbReserved As Byte()

38: RGB
.

public struct RGBQUAD

.

    public byte rgbBlue;

.

    public byte rgbGreen;

.

    public byte rgbRed;

.

    public byte rgbReserved;

.

Structure RGBQUAD

.

    Public rgbBlue As Byte

.

    Public rgbGreen As Byte

.

    Public rgbRed As Byte

.

    Public rgbReserved As Byte

.
Documentation
[RGBQUAD] on MSDN
.

public struct RGBQUAD

.

    public byte rgbBlue;

.

    public byte rgbGreen;

.

    public byte rgbRed;

.

    public byte rgbReserved;

.

Structure RGBQUAD

.

    Public rgbBlue As Byte

.

    Public rgbGreen As Byte

.

    Public rgbRed As Byte

.

    Public rgbReserved As Byte

.
Documentation
[RGBQUAD] on MSDN
.

    public byte[] rgbAtr;

.

    byte[] rgbKey;

Enums

.

   BI_RGB = 0,

.

    BI_RGB

.

   DIB_RGB_COLORS = 0,

.

    DIB_RGB_COLORS

.

    // If the mode is set to MONOCHROME, the swatch's RGB color value will be interpreted as a 1 bit-per-pixel

.

    RGB = 2,    // Solid color swatch

.

    WTSAT_RGB    = 1,

.

    WTSAT_ARGB    = 2


 
Access PInvoke.net directly from VS: