Macaw OS C reference

Function pickcolour

#include <macawui.h>
void pickcolour(
    void (*fn)(const char *hex, int rgb),
    const char *hex,
    const char *title
);

Shows the colour picker, for picking any colour.

Parameters

fnvoid (*)(const char *hex, int rgb)
Your function, called with the colour as "#rrggbb" text and as the number 0xRRGGBB.
hexconst char *
The colour it starts on, like "#ff8800". NULL for white.
titleconst char *
The picker window's title. NULL for "Pick a Colour".

In Dialogs, with alert, confirm, askstring, openfile, savefile.