ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV and WINDEV Mobile 2025 feature!
Help / WLanguage / WLanguage functions / Controls, pages and windows / Palette functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Generates a palette from a base color.
Example
CustomPalette is Palette
// Generate a palette from a color
CustomPalette = PaletteGenerate(0x7F67BE)
// Assign a color from the palette to a control
STC_Promo.BackgroundColor = CustomPalette[BackgroundSelection]
Syntax

Generating a new palette from a base color Hide the details

<Result> = PaletteGenerate(<Base color> [, <Secondary color>])
<Result>: Palette variable
Palette variable corresponding to the generated palette.
<Base color>: Integer
Base color of the palette, used to generate all palette colors. This color can correspond to:
<Secondary color>: Optional integer
Secondary color of the palette.
  • If this parameter is not specified, the secondary color will be automatically calculated.
  • If this parameter is specified, it will determine the secondary color. This color can correspond to:
  • an RGB color (returned by RGB),
  • an HSL color (returned by HSL),
  • a WLanguage preset color,
  • a variable of type Color.
Note: This parameter is only available from version 2025 Update 2.

Generating a palette to replace an existing one Hide the details

PaletteGenerate(<Palette> , <Base color> [, <Secondary color>])
<Palette>: Palette variable
Palette variable corresponding to the palette to be replaced.
<Base color>: Integer
Base color of the palette, used to generate all palette colors. This color can correspond to:
<Secondary color>: Optional integer
Secondary color of the palette.
  • If this parameter is not specified, the secondary color will be automatically calculated.
  • If this parameter is specified, it will determine the secondary color. This color can correspond to:
  • an RGB color (returned by RGB),
  • an HSL color (returned by HSL),
  • a WLanguage preset color,
  • a variable of type Color.
Note: This parameter is only available from version 2025 Update 2.
Business / UI classification: UI Code
Component: wd300pnt.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/22/2025

Send a report | Local help