Color.xml 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Color" version="4.0">
  3. <brief_description>
  4. Color in RGBA format using floats on the range of 0 to 1.
  5. </brief_description>
  6. <description>
  7. A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
  8. You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
  9. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
  10. [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
  11. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
  12. </description>
  13. <tutorials>
  14. <link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link>
  15. <link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link>
  16. <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
  17. </tutorials>
  18. <constructors>
  19. <constructor name="Color">
  20. <return type="Color" />
  21. <description>
  22. Constructs a default-initialized [Color] with all components set to [code]0[/code].
  23. </description>
  24. </constructor>
  25. <constructor name="Color">
  26. <return type="Color" />
  27. <argument index="0" name="from" type="Color" />
  28. <argument index="1" name="alpha" type="float" />
  29. <description>
  30. Constructs a [Color] from an existing color, but with a custom alpha value.
  31. [codeblocks]
  32. [gdscript]
  33. var red = Color(Color.red, 0.5) # 50% transparent red.
  34. [/gdscript]
  35. [csharp]
  36. var red = new Color(Colors.Red, 0.5f); // 50% transparent red.
  37. [/csharp]
  38. [/codeblocks]
  39. </description>
  40. </constructor>
  41. <constructor name="Color">
  42. <return type="Color" />
  43. <argument index="0" name="from" type="Color" />
  44. <description>
  45. Constructs a [Color] as a copy of the given [Color].
  46. </description>
  47. </constructor>
  48. <constructor name="Color">
  49. <return type="Color" />
  50. <argument index="0" name="code" type="String" />
  51. <description>
  52. Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants.
  53. </description>
  54. </constructor>
  55. <constructor name="Color">
  56. <return type="Color" />
  57. <argument index="0" name="code" type="String" />
  58. <argument index="1" name="alpha" type="float" />
  59. <description>
  60. Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants.
  61. </description>
  62. </constructor>
  63. <constructor name="Color">
  64. <return type="Color" />
  65. <argument index="0" name="r" type="float" />
  66. <argument index="1" name="g" type="float" />
  67. <argument index="2" name="b" type="float" />
  68. <description>
  69. Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
  70. [codeblocks]
  71. [gdscript]
  72. var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
  73. [/gdscript]
  74. [csharp]
  75. var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
  76. [/csharp]
  77. [/codeblocks]
  78. </description>
  79. </constructor>
  80. <constructor name="Color">
  81. <return type="Color" />
  82. <argument index="0" name="r" type="float" />
  83. <argument index="1" name="g" type="float" />
  84. <argument index="2" name="b" type="float" />
  85. <argument index="3" name="a" type="float" />
  86. <description>
  87. Constructs a [Color] from RGBA values, typically between 0 and 1.
  88. [codeblocks]
  89. [gdscript]
  90. var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
  91. [/gdscript]
  92. [csharp]
  93. var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
  94. [/csharp]
  95. [/codeblocks]
  96. </description>
  97. </constructor>
  98. </constructors>
  99. <methods>
  100. <method name="blend" qualifiers="const">
  101. <return type="Color" />
  102. <argument index="0" name="over" type="Color" />
  103. <description>
  104. Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values.
  105. [codeblocks]
  106. [gdscript]
  107. var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%
  108. var fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50%
  109. var blended_color = bg.blend(fg) # Brown with alpha of 75%
  110. [/gdscript]
  111. [csharp]
  112. var bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // Green with alpha of 50%
  113. var fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // Red with alpha of 50%
  114. Color blendedColor = bg.Blend(fg); // Brown with alpha of 75%
  115. [/csharp]
  116. [/codeblocks]
  117. </description>
  118. </method>
  119. <method name="clamp" qualifiers="const">
  120. <return type="Color" />
  121. <argument index="0" name="min" type="Color" default="Color(0, 0, 0, 0)" />
  122. <argument index="1" name="max" type="Color" default="Color(1, 1, 1, 1)" />
  123. <description>
  124. Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
  125. </description>
  126. </method>
  127. <method name="darkened" qualifiers="const">
  128. <return type="Color" />
  129. <argument index="0" name="amount" type="float" />
  130. <description>
  131. Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1).
  132. [codeblocks]
  133. [gdscript]
  134. var green = Color(0.0, 1.0, 0.0)
  135. var darkgreen = green.darkened(0.2) # 20% darker than regular green
  136. [/gdscript]
  137. [csharp]
  138. var green = new Color(0.0f, 1.0f, 0.0f);
  139. Color darkgreen = green.Darkened(0.2f); // 20% darker than regular green
  140. [/csharp]
  141. [/codeblocks]
  142. </description>
  143. </method>
  144. <method name="find_named_color" qualifiers="static">
  145. <return type="int" />
  146. <argument index="0" name="name" type="String" />
  147. <description>
  148. </description>
  149. </method>
  150. <method name="from_rgbe9995" qualifiers="static">
  151. <return type="Color" />
  152. <argument index="0" name="rgbe" type="int" />
  153. <description>
  154. </description>
  155. </method>
  156. <method name="from_string" qualifiers="static">
  157. <return type="Color" />
  158. <argument index="0" name="str" type="String" />
  159. <argument index="1" name="default" type="Color" />
  160. <description>
  161. </description>
  162. </method>
  163. <method name="get_named_color" qualifiers="static">
  164. <return type="Color" />
  165. <argument index="0" name="idx" type="int" />
  166. <description>
  167. </description>
  168. </method>
  169. <method name="get_named_color_count" qualifiers="static">
  170. <return type="int" />
  171. <description>
  172. </description>
  173. </method>
  174. <method name="get_named_color_name" qualifiers="static">
  175. <return type="String" />
  176. <argument index="0" name="idx" type="int" />
  177. <description>
  178. </description>
  179. </method>
  180. <method name="hex" qualifiers="static">
  181. <return type="Color" />
  182. <argument index="0" name="hex" type="int" />
  183. <description>
  184. </description>
  185. </method>
  186. <method name="hex64" qualifiers="static">
  187. <return type="Color" />
  188. <argument index="0" name="hex" type="int" />
  189. <description>
  190. </description>
  191. </method>
  192. <method name="html" qualifiers="static">
  193. <return type="Color" />
  194. <argument index="0" name="rgba" type="String" />
  195. <description>
  196. </description>
  197. </method>
  198. <method name="html_is_valid" qualifiers="static">
  199. <return type="bool" />
  200. <argument index="0" name="color" type="String" />
  201. <description>
  202. </description>
  203. </method>
  204. <method name="inverted" qualifiers="const">
  205. <return type="Color" />
  206. <description>
  207. Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code].
  208. [codeblocks]
  209. [gdscript]
  210. var color = Color(0.3, 0.4, 0.9)
  211. var inverted_color = color.inverted() # Equivalent to `Color(0.7, 0.6, 0.1)`
  212. [/gdscript]
  213. [csharp]
  214. var color = new Color(0.3f, 0.4f, 0.9f);
  215. Color invertedColor = color.Inverted(); // Equivalent to `new Color(0.7f, 0.6f, 0.1f)`
  216. [/csharp]
  217. [/codeblocks]
  218. </description>
  219. </method>
  220. <method name="is_equal_approx" qualifiers="const">
  221. <return type="bool" />
  222. <argument index="0" name="to" type="Color" />
  223. <description>
  224. Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
  225. </description>
  226. </method>
  227. <method name="lerp" qualifiers="const">
  228. <return type="Color" />
  229. <argument index="0" name="to" type="Color" />
  230. <argument index="1" name="weight" type="float" />
  231. <description>
  232. Returns the linear interpolation with another color. The interpolation factor [code]weight[/code] is between 0 and 1.
  233. [codeblocks]
  234. [gdscript]
  235. var c1 = Color(1.0, 0.0, 0.0)
  236. var c2 = Color(0.0, 1.0, 0.0)
  237. var lerp_color = c1.lerp(c2, 0.5) # Equivalent to `Color(0.5, 0.5, 0.0)`
  238. [/gdscript]
  239. [csharp]
  240. var c1 = new Color(1.0f, 0.0f, 0.0f);
  241. var c2 = new Color(0.0f, 1.0f, 0.0f);
  242. Color lerpColor = c1.Lerp(c2, 0.5f); // Equivalent to `new Color(0.5f, 0.5f, 0.0f)`
  243. [/csharp]
  244. [/codeblocks]
  245. </description>
  246. </method>
  247. <method name="lightened" qualifiers="const">
  248. <return type="Color" />
  249. <argument index="0" name="amount" type="float" />
  250. <description>
  251. Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1).
  252. [codeblocks]
  253. [gdscript]
  254. var green = Color(0.0, 1.0, 0.0)
  255. var lightgreen = green.lightened(0.2) # 20% lighter than regular green
  256. [/gdscript]
  257. [csharp]
  258. var green = new Color(0.0f, 1.0f, 0.0f);
  259. Color lightgreen = green.Lightened(0.2f); // 20% lighter than regular green
  260. [/csharp]
  261. [/codeblocks]
  262. </description>
  263. </method>
  264. <method name="to_abgr32" qualifiers="const">
  265. <return type="int" />
  266. <description>
  267. Returns the color converted to a 32-bit integer in ABGR format (each byte represents a color channel). ABGR is the reversed version of the default format.
  268. [codeblocks]
  269. [gdscript]
  270. var color = Color(1, 0.5, 0.2)
  271. print(color.to_abgr32()) # Prints 4281565439
  272. [/gdscript]
  273. [csharp]
  274. var color = new Color(1.0f, 0.5f, 0.2f);
  275. GD.Print(color.ToAbgr32()); // Prints 4281565439
  276. [/csharp]
  277. [/codeblocks]
  278. </description>
  279. </method>
  280. <method name="to_abgr64" qualifiers="const">
  281. <return type="int" />
  282. <description>
  283. Returns the color converted to a 64-bit integer in ABGR format (each word represents a color channel). ABGR is the reversed version of the default format.
  284. [codeblocks]
  285. [gdscript]
  286. var color = Color(1, 0.5, 0.2)
  287. print(color.to_abgr64()) # Prints -225178692812801
  288. [/gdscript]
  289. [csharp]
  290. var color = new Color(1.0f, 0.5f, 0.2f);
  291. GD.Print(color.ToAbgr64()); // Prints -225178692812801
  292. [/csharp]
  293. [/codeblocks]
  294. </description>
  295. </method>
  296. <method name="to_argb32" qualifiers="const">
  297. <return type="int" />
  298. <description>
  299. Returns the color converted to a 32-bit integer in ARGB format (each byte represents a color channel). ARGB is more compatible with DirectX.
  300. [codeblocks]
  301. [gdscript]
  302. var color = Color(1, 0.5, 0.2)
  303. print(color.to_argb32()) # Prints 4294934323
  304. [/gdscript]
  305. [csharp]
  306. var color = new Color(1.0f, 0.5f, 0.2f);
  307. GD.Print(color.ToArgb32()); // Prints 4294934323
  308. [/csharp]
  309. [/codeblocks]
  310. </description>
  311. </method>
  312. <method name="to_argb64" qualifiers="const">
  313. <return type="int" />
  314. <description>
  315. Returns the color converted to a 64-bit integer in ARGB format (each word represents a color channel). ARGB is more compatible with DirectX.
  316. [codeblocks]
  317. [gdscript]
  318. var color = Color(1, 0.5, 0.2)
  319. print(color.to_argb64()) # Prints -2147470541
  320. [/gdscript]
  321. [csharp]
  322. var color = new Color(1.0f, 0.5f, 0.2f);
  323. GD.Print(color.ToArgb64()); // Prints -2147470541
  324. [/csharp]
  325. [/codeblocks]
  326. </description>
  327. </method>
  328. <method name="to_html" qualifiers="const">
  329. <return type="String" />
  330. <argument index="0" name="with_alpha" type="bool" default="true" />
  331. <description>
  332. Returns the color converted to an HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]).
  333. Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format).
  334. [codeblocks]
  335. [gdscript]
  336. var color = Color(1, 1, 1, 0.5)
  337. var with_alpha = color.to_html() # Returns "ffffff7f"
  338. var without_alpha = color.to_html(false) # Returns "ffffff"
  339. [/gdscript]
  340. [csharp]
  341. var color = new Color(1, 1, 1, 0.5f);
  342. String withAlpha = color.ToHtml(); // Returns "ffffff7f"
  343. String withoutAlpha = color.ToHtml(false); // Returns "ffffff"
  344. [/csharp]
  345. [/codeblocks]
  346. </description>
  347. </method>
  348. <method name="to_rgba32" qualifiers="const">
  349. <return type="int" />
  350. <description>
  351. Returns the color converted to a 32-bit integer in RGBA format (each byte represents a color channel). RGBA is Godot's default format.
  352. [codeblocks]
  353. [gdscript]
  354. var color = Color(1, 0.5, 0.2)
  355. print(color.to_rgba32()) # Prints 4286526463
  356. [/gdscript]
  357. [csharp]
  358. var color = new Color(1, 0.5f, 0.2f);
  359. GD.Print(color.ToRgba32()); // Prints 4286526463
  360. [/csharp]
  361. [/codeblocks]
  362. </description>
  363. </method>
  364. <method name="to_rgba64" qualifiers="const">
  365. <return type="int" />
  366. <description>
  367. Returns the color converted to a 64-bit integer in RGBA format (each word represents a color channel). RGBA is Godot's default format.
  368. [codeblocks]
  369. [gdscript]
  370. var color = Color(1, 0.5, 0.2)
  371. print(color.to_rgba64()) # Prints -140736629309441
  372. [/gdscript]
  373. [csharp]
  374. var color = new Color(1, 0.5f, 0.2f);
  375. GD.Print(color.ToRgba64()); // Prints -140736629309441
  376. [/csharp]
  377. [/codeblocks]
  378. </description>
  379. </method>
  380. </methods>
  381. <members>
  382. <member name="a" type="float" setter="" getter="" default="1.0">
  383. The color's alpha (transparency) component, typically on the range of 0 to 1.
  384. </member>
  385. <member name="a8" type="int" setter="" getter="" default="255">
  386. Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1.
  387. </member>
  388. <member name="b" type="float" setter="" getter="" default="0.0">
  389. The color's blue component, typically on the range of 0 to 1.
  390. </member>
  391. <member name="b8" type="int" setter="" getter="" default="0">
  392. Wrapper for [member b] that uses the range 0 to 255 instead of 0 to 1.
  393. </member>
  394. <member name="g" type="float" setter="" getter="" default="0.0">
  395. The color's green component, typically on the range of 0 to 1.
  396. </member>
  397. <member name="g8" type="int" setter="" getter="" default="0">
  398. Wrapper for [member g] that uses the range 0 to 255 instead of 0 to 1.
  399. </member>
  400. <member name="h" type="float" setter="" getter="" default="0.0">
  401. The HSV hue of this color, on the range 0 to 1.
  402. </member>
  403. <member name="r" type="float" setter="" getter="" default="0.0">
  404. The color's red component, typically on the range of 0 to 1.
  405. </member>
  406. <member name="r8" type="int" setter="" getter="" default="0">
  407. Wrapper for [member r] that uses the range 0 to 255 instead of 0 to 1.
  408. </member>
  409. <member name="s" type="float" setter="" getter="" default="0.0">
  410. The HSV saturation of this color, on the range 0 to 1.
  411. </member>
  412. <member name="v" type="float" setter="" getter="" default="0.0">
  413. The HSV value (brightness) of this color, on the range 0 to 1.
  414. </member>
  415. </members>
  416. <constants>
  417. <constant name="ALICE_BLUE" value="Color(0.94, 0.97, 1, 1)">
  418. Alice blue color.
  419. </constant>
  420. <constant name="ANTIQUE_WHITE" value="Color(0.98, 0.92, 0.84, 1)">
  421. Antique white color.
  422. </constant>
  423. <constant name="AQUA" value="Color(0, 1, 1, 1)">
  424. Aqua color.
  425. </constant>
  426. <constant name="AQUAMARINE" value="Color(0.5, 1, 0.83, 1)">
  427. Aquamarine color.
  428. </constant>
  429. <constant name="AZURE" value="Color(0.94, 1, 1, 1)">
  430. Azure color.
  431. </constant>
  432. <constant name="BEIGE" value="Color(0.96, 0.96, 0.86, 1)">
  433. Beige color.
  434. </constant>
  435. <constant name="BISQUE" value="Color(1, 0.89, 0.77, 1)">
  436. Bisque color.
  437. </constant>
  438. <constant name="BLACK" value="Color(0, 0, 0, 1)">
  439. Black color.
  440. </constant>
  441. <constant name="BLANCHED_ALMOND" value="Color(1, 0.92, 0.8, 1)">
  442. Blanched almond color.
  443. </constant>
  444. <constant name="BLUE" value="Color(0, 0, 1, 1)">
  445. Blue color.
  446. </constant>
  447. <constant name="BLUE_VIOLET" value="Color(0.54, 0.17, 0.89, 1)">
  448. Blue violet color.
  449. </constant>
  450. <constant name="BROWN" value="Color(0.65, 0.16, 0.16, 1)">
  451. Brown color.
  452. </constant>
  453. <constant name="BURLYWOOD" value="Color(0.87, 0.72, 0.53, 1)">
  454. Burlywood color.
  455. </constant>
  456. <constant name="CADET_BLUE" value="Color(0.37, 0.62, 0.63, 1)">
  457. Cadet blue color.
  458. </constant>
  459. <constant name="CHARTREUSE" value="Color(0.5, 1, 0, 1)">
  460. Chartreuse color.
  461. </constant>
  462. <constant name="CHOCOLATE" value="Color(0.82, 0.41, 0.12, 1)">
  463. Chocolate color.
  464. </constant>
  465. <constant name="CORAL" value="Color(1, 0.5, 0.31, 1)">
  466. Coral color.
  467. </constant>
  468. <constant name="CORNFLOWER_BLUE" value="Color(0.39, 0.58, 0.93, 1)">
  469. Cornflower blue color.
  470. </constant>
  471. <constant name="CORNSILK" value="Color(1, 0.97, 0.86, 1)">
  472. Cornsilk color.
  473. </constant>
  474. <constant name="CRIMSON" value="Color(0.86, 0.08, 0.24, 1)">
  475. Crimson color.
  476. </constant>
  477. <constant name="CYAN" value="Color(0, 1, 1, 1)">
  478. Cyan color.
  479. </constant>
  480. <constant name="DARK_BLUE" value="Color(0, 0, 0.55, 1)">
  481. Dark blue color.
  482. </constant>
  483. <constant name="DARK_CYAN" value="Color(0, 0.55, 0.55, 1)">
  484. Dark cyan color.
  485. </constant>
  486. <constant name="DARK_GOLDENROD" value="Color(0.72, 0.53, 0.04, 1)">
  487. Dark goldenrod color.
  488. </constant>
  489. <constant name="DARK_GRAY" value="Color(0.66, 0.66, 0.66, 1)">
  490. Dark gray color.
  491. </constant>
  492. <constant name="DARK_GREEN" value="Color(0, 0.39, 0, 1)">
  493. Dark green color.
  494. </constant>
  495. <constant name="DARK_KHAKI" value="Color(0.74, 0.72, 0.42, 1)">
  496. Dark khaki color.
  497. </constant>
  498. <constant name="DARK_MAGENTA" value="Color(0.55, 0, 0.55, 1)">
  499. Dark magenta color.
  500. </constant>
  501. <constant name="DARK_OLIVE_GREEN" value="Color(0.33, 0.42, 0.18, 1)">
  502. Dark olive green color.
  503. </constant>
  504. <constant name="DARK_ORANGE" value="Color(1, 0.55, 0, 1)">
  505. Dark orange color.
  506. </constant>
  507. <constant name="DARK_ORCHID" value="Color(0.6, 0.2, 0.8, 1)">
  508. Dark orchid color.
  509. </constant>
  510. <constant name="DARK_RED" value="Color(0.55, 0, 0, 1)">
  511. Dark red color.
  512. </constant>
  513. <constant name="DARK_SALMON" value="Color(0.91, 0.59, 0.48, 1)">
  514. Dark salmon color.
  515. </constant>
  516. <constant name="DARK_SEA_GREEN" value="Color(0.56, 0.74, 0.56, 1)">
  517. Dark sea green color.
  518. </constant>
  519. <constant name="DARK_SLATE_BLUE" value="Color(0.28, 0.24, 0.55, 1)">
  520. Dark slate blue color.
  521. </constant>
  522. <constant name="DARK_SLATE_GRAY" value="Color(0.18, 0.31, 0.31, 1)">
  523. Dark slate gray color.
  524. </constant>
  525. <constant name="DARK_TURQUOISE" value="Color(0, 0.81, 0.82, 1)">
  526. Dark turquoise color.
  527. </constant>
  528. <constant name="DARK_VIOLET" value="Color(0.58, 0, 0.83, 1)">
  529. Dark violet color.
  530. </constant>
  531. <constant name="DEEP_PINK" value="Color(1, 0.08, 0.58, 1)">
  532. Deep pink color.
  533. </constant>
  534. <constant name="DEEP_SKY_BLUE" value="Color(0, 0.75, 1, 1)">
  535. Deep sky blue color.
  536. </constant>
  537. <constant name="DIM_GRAY" value="Color(0.41, 0.41, 0.41, 1)">
  538. Dim gray color.
  539. </constant>
  540. <constant name="DODGER_BLUE" value="Color(0.12, 0.56, 1, 1)">
  541. Dodger blue color.
  542. </constant>
  543. <constant name="FIREBRICK" value="Color(0.7, 0.13, 0.13, 1)">
  544. Firebrick color.
  545. </constant>
  546. <constant name="FLORAL_WHITE" value="Color(1, 0.98, 0.94, 1)">
  547. Floral white color.
  548. </constant>
  549. <constant name="FOREST_GREEN" value="Color(0.13, 0.55, 0.13, 1)">
  550. Forest green color.
  551. </constant>
  552. <constant name="FUCHSIA" value="Color(1, 0, 1, 1)">
  553. Fuchsia color.
  554. </constant>
  555. <constant name="GAINSBORO" value="Color(0.86, 0.86, 0.86, 1)">
  556. Gainsboro color.
  557. </constant>
  558. <constant name="GHOST_WHITE" value="Color(0.97, 0.97, 1, 1)">
  559. Ghost white color.
  560. </constant>
  561. <constant name="GOLD" value="Color(1, 0.84, 0, 1)">
  562. Gold color.
  563. </constant>
  564. <constant name="GOLDENROD" value="Color(0.85, 0.65, 0.13, 1)">
  565. Goldenrod color.
  566. </constant>
  567. <constant name="GRAY" value="Color(0.75, 0.75, 0.75, 1)">
  568. Gray color.
  569. </constant>
  570. <constant name="GREEN" value="Color(0, 1, 0, 1)">
  571. Green color.
  572. </constant>
  573. <constant name="GREEN_YELLOW" value="Color(0.68, 1, 0.18, 1)">
  574. Green yellow color.
  575. </constant>
  576. <constant name="HONEYDEW" value="Color(0.94, 1, 0.94, 1)">
  577. Honeydew color.
  578. </constant>
  579. <constant name="HOT_PINK" value="Color(1, 0.41, 0.71, 1)">
  580. Hot pink color.
  581. </constant>
  582. <constant name="INDIAN_RED" value="Color(0.8, 0.36, 0.36, 1)">
  583. Indian red color.
  584. </constant>
  585. <constant name="INDIGO" value="Color(0.29, 0, 0.51, 1)">
  586. Indigo color.
  587. </constant>
  588. <constant name="IVORY" value="Color(1, 1, 0.94, 1)">
  589. Ivory color.
  590. </constant>
  591. <constant name="KHAKI" value="Color(0.94, 0.9, 0.55, 1)">
  592. Khaki color.
  593. </constant>
  594. <constant name="LAVENDER" value="Color(0.9, 0.9, 0.98, 1)">
  595. Lavender color.
  596. </constant>
  597. <constant name="LAVENDER_BLUSH" value="Color(1, 0.94, 0.96, 1)">
  598. Lavender blush color.
  599. </constant>
  600. <constant name="LAWN_GREEN" value="Color(0.49, 0.99, 0, 1)">
  601. Lawn green color.
  602. </constant>
  603. <constant name="LEMON_CHIFFON" value="Color(1, 0.98, 0.8, 1)">
  604. Lemon chiffon color.
  605. </constant>
  606. <constant name="LIGHT_BLUE" value="Color(0.68, 0.85, 0.9, 1)">
  607. Light blue color.
  608. </constant>
  609. <constant name="LIGHT_CORAL" value="Color(0.94, 0.5, 0.5, 1)">
  610. Light coral color.
  611. </constant>
  612. <constant name="LIGHT_CYAN" value="Color(0.88, 1, 1, 1)">
  613. Light cyan color.
  614. </constant>
  615. <constant name="LIGHT_GOLDENROD" value="Color(0.98, 0.98, 0.82, 1)">
  616. Light goldenrod color.
  617. </constant>
  618. <constant name="LIGHT_GRAY" value="Color(0.83, 0.83, 0.83, 1)">
  619. Light gray color.
  620. </constant>
  621. <constant name="LIGHT_GREEN" value="Color(0.56, 0.93, 0.56, 1)">
  622. Light green color.
  623. </constant>
  624. <constant name="LIGHT_PINK" value="Color(1, 0.71, 0.76, 1)">
  625. Light pink color.
  626. </constant>
  627. <constant name="LIGHT_SALMON" value="Color(1, 0.63, 0.48, 1)">
  628. Light salmon color.
  629. </constant>
  630. <constant name="LIGHT_SEA_GREEN" value="Color(0.13, 0.7, 0.67, 1)">
  631. Light sea green color.
  632. </constant>
  633. <constant name="LIGHT_SKY_BLUE" value="Color(0.53, 0.81, 0.98, 1)">
  634. Light sky blue color.
  635. </constant>
  636. <constant name="LIGHT_SLATE_GRAY" value="Color(0.47, 0.53, 0.6, 1)">
  637. Light slate gray color.
  638. </constant>
  639. <constant name="LIGHT_STEEL_BLUE" value="Color(0.69, 0.77, 0.87, 1)">
  640. Light steel blue color.
  641. </constant>
  642. <constant name="LIGHT_YELLOW" value="Color(1, 1, 0.88, 1)">
  643. Light yellow color.
  644. </constant>
  645. <constant name="LIME" value="Color(0, 1, 0, 1)">
  646. Lime color.
  647. </constant>
  648. <constant name="LIME_GREEN" value="Color(0.2, 0.8, 0.2, 1)">
  649. Lime green color.
  650. </constant>
  651. <constant name="LINEN" value="Color(0.98, 0.94, 0.9, 1)">
  652. Linen color.
  653. </constant>
  654. <constant name="MAGENTA" value="Color(1, 0, 1, 1)">
  655. Magenta color.
  656. </constant>
  657. <constant name="MAROON" value="Color(0.69, 0.19, 0.38, 1)">
  658. Maroon color.
  659. </constant>
  660. <constant name="MEDIUM_AQUAMARINE" value="Color(0.4, 0.8, 0.67, 1)">
  661. Medium aquamarine color.
  662. </constant>
  663. <constant name="MEDIUM_BLUE" value="Color(0, 0, 0.8, 1)">
  664. Medium blue color.
  665. </constant>
  666. <constant name="MEDIUM_ORCHID" value="Color(0.73, 0.33, 0.83, 1)">
  667. Medium orchid color.
  668. </constant>
  669. <constant name="MEDIUM_PURPLE" value="Color(0.58, 0.44, 0.86, 1)">
  670. Medium purple color.
  671. </constant>
  672. <constant name="MEDIUM_SEA_GREEN" value="Color(0.24, 0.7, 0.44, 1)">
  673. Medium sea green color.
  674. </constant>
  675. <constant name="MEDIUM_SLATE_BLUE" value="Color(0.48, 0.41, 0.93, 1)">
  676. Medium slate blue color.
  677. </constant>
  678. <constant name="MEDIUM_SPRING_GREEN" value="Color(0, 0.98, 0.6, 1)">
  679. Medium spring green color.
  680. </constant>
  681. <constant name="MEDIUM_TURQUOISE" value="Color(0.28, 0.82, 0.8, 1)">
  682. Medium turquoise color.
  683. </constant>
  684. <constant name="MEDIUM_VIOLET_RED" value="Color(0.78, 0.08, 0.52, 1)">
  685. Medium violet red color.
  686. </constant>
  687. <constant name="MIDNIGHT_BLUE" value="Color(0.1, 0.1, 0.44, 1)">
  688. Midnight blue color.
  689. </constant>
  690. <constant name="MINT_CREAM" value="Color(0.96, 1, 0.98, 1)">
  691. Mint cream color.
  692. </constant>
  693. <constant name="MISTY_ROSE" value="Color(1, 0.89, 0.88, 1)">
  694. Misty rose color.
  695. </constant>
  696. <constant name="MOCCASIN" value="Color(1, 0.89, 0.71, 1)">
  697. Moccasin color.
  698. </constant>
  699. <constant name="NAVAJO_WHITE" value="Color(1, 0.87, 0.68, 1)">
  700. Navajo white color.
  701. </constant>
  702. <constant name="NAVY_BLUE" value="Color(0, 0, 0.5, 1)">
  703. Navy blue color.
  704. </constant>
  705. <constant name="OLD_LACE" value="Color(0.99, 0.96, 0.9, 1)">
  706. Old lace color.
  707. </constant>
  708. <constant name="OLIVE" value="Color(0.5, 0.5, 0, 1)">
  709. Olive color.
  710. </constant>
  711. <constant name="OLIVE_DRAB" value="Color(0.42, 0.56, 0.14, 1)">
  712. Olive drab color.
  713. </constant>
  714. <constant name="ORANGE" value="Color(1, 0.65, 0, 1)">
  715. Orange color.
  716. </constant>
  717. <constant name="ORANGE_RED" value="Color(1, 0.27, 0, 1)">
  718. Orange red color.
  719. </constant>
  720. <constant name="ORCHID" value="Color(0.85, 0.44, 0.84, 1)">
  721. Orchid color.
  722. </constant>
  723. <constant name="PALE_GOLDENROD" value="Color(0.93, 0.91, 0.67, 1)">
  724. Pale goldenrod color.
  725. </constant>
  726. <constant name="PALE_GREEN" value="Color(0.6, 0.98, 0.6, 1)">
  727. Pale green color.
  728. </constant>
  729. <constant name="PALE_TURQUOISE" value="Color(0.69, 0.93, 0.93, 1)">
  730. Pale turquoise color.
  731. </constant>
  732. <constant name="PALE_VIOLET_RED" value="Color(0.86, 0.44, 0.58, 1)">
  733. Pale violet red color.
  734. </constant>
  735. <constant name="PAPAYA_WHIP" value="Color(1, 0.94, 0.84, 1)">
  736. Papaya whip color.
  737. </constant>
  738. <constant name="PEACH_PUFF" value="Color(1, 0.85, 0.73, 1)">
  739. Peach puff color.
  740. </constant>
  741. <constant name="PERU" value="Color(0.8, 0.52, 0.25, 1)">
  742. Peru color.
  743. </constant>
  744. <constant name="PINK" value="Color(1, 0.75, 0.8, 1)">
  745. Pink color.
  746. </constant>
  747. <constant name="PLUM" value="Color(0.87, 0.63, 0.87, 1)">
  748. Plum color.
  749. </constant>
  750. <constant name="POWDER_BLUE" value="Color(0.69, 0.88, 0.9, 1)">
  751. Powder blue color.
  752. </constant>
  753. <constant name="PURPLE" value="Color(0.63, 0.13, 0.94, 1)">
  754. Purple color.
  755. </constant>
  756. <constant name="REBECCA_PURPLE" value="Color(0.4, 0.2, 0.6, 1)">
  757. Rebecca purple color.
  758. </constant>
  759. <constant name="RED" value="Color(1, 0, 0, 1)">
  760. Red color.
  761. </constant>
  762. <constant name="ROSY_BROWN" value="Color(0.74, 0.56, 0.56, 1)">
  763. Rosy brown color.
  764. </constant>
  765. <constant name="ROYAL_BLUE" value="Color(0.25, 0.41, 0.88, 1)">
  766. Royal blue color.
  767. </constant>
  768. <constant name="SADDLE_BROWN" value="Color(0.55, 0.27, 0.07, 1)">
  769. Saddle brown color.
  770. </constant>
  771. <constant name="SALMON" value="Color(0.98, 0.5, 0.45, 1)">
  772. Salmon color.
  773. </constant>
  774. <constant name="SANDY_BROWN" value="Color(0.96, 0.64, 0.38, 1)">
  775. Sandy brown color.
  776. </constant>
  777. <constant name="SEA_GREEN" value="Color(0.18, 0.55, 0.34, 1)">
  778. Sea green color.
  779. </constant>
  780. <constant name="SEASHELL" value="Color(1, 0.96, 0.93, 1)">
  781. Seashell color.
  782. </constant>
  783. <constant name="SIENNA" value="Color(0.63, 0.32, 0.18, 1)">
  784. Sienna color.
  785. </constant>
  786. <constant name="SILVER" value="Color(0.75, 0.75, 0.75, 1)">
  787. Silver color.
  788. </constant>
  789. <constant name="SKY_BLUE" value="Color(0.53, 0.81, 0.92, 1)">
  790. Sky blue color.
  791. </constant>
  792. <constant name="SLATE_BLUE" value="Color(0.42, 0.35, 0.8, 1)">
  793. Slate blue color.
  794. </constant>
  795. <constant name="SLATE_GRAY" value="Color(0.44, 0.5, 0.56, 1)">
  796. Slate gray color.
  797. </constant>
  798. <constant name="SNOW" value="Color(1, 0.98, 0.98, 1)">
  799. Snow color.
  800. </constant>
  801. <constant name="SPRING_GREEN" value="Color(0, 1, 0.5, 1)">
  802. Spring green color.
  803. </constant>
  804. <constant name="STEEL_BLUE" value="Color(0.27, 0.51, 0.71, 1)">
  805. Steel blue color.
  806. </constant>
  807. <constant name="TAN" value="Color(0.82, 0.71, 0.55, 1)">
  808. Tan color.
  809. </constant>
  810. <constant name="TEAL" value="Color(0, 0.5, 0.5, 1)">
  811. Teal color.
  812. </constant>
  813. <constant name="THISTLE" value="Color(0.85, 0.75, 0.85, 1)">
  814. Thistle color.
  815. </constant>
  816. <constant name="TOMATO" value="Color(1, 0.39, 0.28, 1)">
  817. Tomato color.
  818. </constant>
  819. <constant name="TRANSPARENT" value="Color(1, 1, 1, 0)">
  820. Transparent color (white with zero alpha).
  821. </constant>
  822. <constant name="TURQUOISE" value="Color(0.25, 0.88, 0.82, 1)">
  823. Turquoise color.
  824. </constant>
  825. <constant name="VIOLET" value="Color(0.93, 0.51, 0.93, 1)">
  826. Violet color.
  827. </constant>
  828. <constant name="WEB_GRAY" value="Color(0.5, 0.5, 0.5, 1)">
  829. Web gray color.
  830. </constant>
  831. <constant name="WEB_GREEN" value="Color(0, 0.5, 0, 1)">
  832. Web green color.
  833. </constant>
  834. <constant name="WEB_MAROON" value="Color(0.5, 0, 0, 1)">
  835. Web maroon color.
  836. </constant>
  837. <constant name="WEB_PURPLE" value="Color(0.5, 0, 0.5, 1)">
  838. Web purple color.
  839. </constant>
  840. <constant name="WHEAT" value="Color(0.96, 0.87, 0.7, 1)">
  841. Wheat color.
  842. </constant>
  843. <constant name="WHITE" value="Color(1, 1, 1, 1)">
  844. White color.
  845. </constant>
  846. <constant name="WHITE_SMOKE" value="Color(0.96, 0.96, 0.96, 1)">
  847. White smoke color.
  848. </constant>
  849. <constant name="YELLOW" value="Color(1, 1, 0, 1)">
  850. Yellow color.
  851. </constant>
  852. <constant name="YELLOW_GREEN" value="Color(0.6, 0.8, 0.2, 1)">
  853. Yellow green color.
  854. </constant>
  855. </constants>
  856. <operators>
  857. <operator name="operator !=">
  858. <return type="bool" />
  859. <description>
  860. </description>
  861. </operator>
  862. <operator name="operator !=">
  863. <return type="bool" />
  864. <argument index="0" name="right" type="Color" />
  865. <description>
  866. </description>
  867. </operator>
  868. <operator name="operator *">
  869. <return type="Color" />
  870. <argument index="0" name="right" type="Color" />
  871. <description>
  872. </description>
  873. </operator>
  874. <operator name="operator *">
  875. <return type="Color" />
  876. <argument index="0" name="right" type="float" />
  877. <description>
  878. </description>
  879. </operator>
  880. <operator name="operator *">
  881. <return type="Color" />
  882. <argument index="0" name="right" type="int" />
  883. <description>
  884. </description>
  885. </operator>
  886. <operator name="operator +">
  887. <return type="Color" />
  888. <argument index="0" name="right" type="Color" />
  889. <description>
  890. </description>
  891. </operator>
  892. <operator name="operator -">
  893. <return type="Color" />
  894. <argument index="0" name="right" type="Color" />
  895. <description>
  896. </description>
  897. </operator>
  898. <operator name="operator /">
  899. <return type="Color" />
  900. <argument index="0" name="right" type="Color" />
  901. <description>
  902. </description>
  903. </operator>
  904. <operator name="operator /">
  905. <return type="Color" />
  906. <argument index="0" name="right" type="float" />
  907. <description>
  908. </description>
  909. </operator>
  910. <operator name="operator /">
  911. <return type="Color" />
  912. <argument index="0" name="right" type="int" />
  913. <description>
  914. </description>
  915. </operator>
  916. <operator name="operator ==">
  917. <return type="bool" />
  918. <description>
  919. </description>
  920. </operator>
  921. <operator name="operator ==">
  922. <return type="bool" />
  923. <argument index="0" name="right" type="Color" />
  924. <description>
  925. </description>
  926. </operator>
  927. <operator name="operator []">
  928. <return type="float" />
  929. <argument index="0" name="index" type="int" />
  930. <description>
  931. </description>
  932. </operator>
  933. <operator name="operator unary+">
  934. <return type="Color" />
  935. <description>
  936. </description>
  937. </operator>
  938. <operator name="operator unary-">
  939. <return type="Color" />
  940. <description>
  941. </description>
  942. </operator>
  943. </operators>
  944. </class>