This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathanswer-color.lcdoc
More file actions
71 lines (48 loc) · 1.92 KB
/
answer-color.lcdoc
File metadata and controls
71 lines (48 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Name: answer color
Type: command
Syntax: answer color [with <startingColor>]
Summary:
Displays the operating system's standard color-selection <dialog box>.
Introduced: 1.1
OS: mac, windows, linux
Platforms: desktop
Example:
answer color
Example:
if theItem is "Custom Color..." then answer color
Example:
answer color with "#FF0033"
Example:
answer color with "AliceBlue"
Parameters:
startingColor:
A <color reference> in one of the following forms:
- a standard color name
- three comma-separated integers between zero and 255, specifying the
level of each of red, green, and blue
- an HTML-style color consisting of a hash mark (#) followed by three
hexadecimal numbers, one for each of red, green, and blue.
It:
The color the user chooses is placed in the <it> <variable>.
The result:
If the user cancels the <dialog box|dialog>, the <it> <variable> is set
to empty, and the <result> <function> <return|returns> "Cancel".
Description:
Use the <answer color> <command> to select a custom color.
The <answer color> <command> displays a <dialog box> where the user can
select a color. (This <dialog box> is displayed by the operating system,
not by LiveCode.)
If you specify a <startingColor>, the <dialog box> displays that color by
default.
The color is returned in the form of three comma-separated integers
between zero and 255, specifying the level of each of red, green, and
blue. This format can be used directly to set any color property.
Changes:
The option to specify a startingColor was introduced in version 1.1.1.
In previous versions, the dialog box displayed white by default.
References: answer (command), function (control structure),
result (function), colorNames (function), dialog box (glossary),
variable (glossary), command (glossary), return (glossary),
color reference (glossary), it (keyword), systemColorSelector (property),
backgroundColor (property), colors (property), foregroundColor (property)
Tags: ui