Displays a Windows Color Picker dialog and returns the selected color as RGB string.
Takes window (Int).
Returns formatted string "RGB(r,g,b)" on success, empty string if user cancels or window not found.
BGI GUI
Parameters & Returns
Parameters
windowInt
Returns
String
Quick Summary
Displays a Windows Color Picker dialog and returns the selected color as RGB string.
Takes window (Int).
Returns formatted string "RGB(r,g,b)" on success, empty string if user cancels or window not found.
Technical Exegesis...
Displays a Windows Color Picker dialog and returns the selected color as RGB string. Searches gizmoMap for window ID to get parent HWND. Creates CHOOSECOLOR structure with CC_FULLOPEN | CC_RGBINIT flags (shows full dialog with custom colors), lpCustColors array (16 custom color slots). Calls ChooseColor() to show dialog.
Displays a Windows Color Picker dialog and returns the selected color as RGB string. Searches gizmoMap for window ID to get parent HWND. Creates CHOOSECOLOR structure with CC_FULLOPEN | CC_RGBINIT flags (shows full dialog with custom colors), lpCustColors array (16 custom color slots). Calls ChooseColor() to show dialog. If user selects color, extracts RGB components with GetRValue/GetGValue/GetBValue and stores in global variables: requestedRed, requestedGreen, requestedBlue (0-255 integers) and requestedRedF, requestedGreenF, requestedBlueF (0.0-1.0 floats). Returns formatted string "RGB(r,g,b)" on success, empty string if user cancels or window not found.
This function shows the standard Windows color picker with basic and custom color palettes. CC_FULLOPEN flag expands dialog to show custom color editor immediately. Selected color is stored in multiple formats for convenience: integer RGB (0-255) and float RGB (0.0-1.0). Use bgiRequestedRed/Green/Blue() to get integer components, bgiRequestedRedF/GreenF/BlueF() to get float components. Dialog is modal - blocks until user selects or cancels. Use for letting users choose colors for drawing, UI themes, or text formatting.