Condividi tramite


CDrawingManager::RGBtoHSV

Converts a color from a RGB representation to a HSV representation.

static void __stdcall RGBtoHSV(
   COLORREF rgb,
   double *H,
   double *S,
   double *V
);

Parameters

  • [in] rgb
    The color to convert in a RGB representation.

  • [out] H
    A pointer to a double where this method stores the resulting hue for the color.

  • [out] S
    A pointer to a double where this method stores the resulting saturation for the color.

  • [out] V
    A pointer to a double where this method stores the resulting value for the color.

Remarks

A color can be represented as HSV (hue, saturation, and value), HSL (hue, saturation, and luminosity), or RGB (red, green, and blue). For more information about the different representations of color, see Color.

The returned value for H is a number between 0 and 360 where both 0 and 360 indicate red. The return values for S and V are numbers between 0 and 1.

Requirements

Header: afxdrawmanager.h

See Also

Reference

CDrawingManager Class

Hierarchy Chart

CDrawingManager::HSVtoRGB