summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-22 01:27:01 +0100
committerGitHub <noreply@github.com>2017-11-22 01:27:01 +0100
commit9638c9cb5d5b43a19df390fa0bf6e996e84903bc (patch)
tree9cdd90acb6039df75df93c0c6953719bec266360 /doc
parent3b7e9df2553f17f7d6eef5c7cb63b14d58d99d9f (diff)
parent8e4336a7294f0cc31aa5ccfb2854c702aa86dcca (diff)
Merge pull request #12371 from donkeybonks/color-lighten-darken
Add Color.lighten and Color.darken (like LESS.css or SASS) #2
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Color.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 479eb719d4..ce49ec6654 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -126,6 +126,32 @@
[/codeblock]
</description>
</method>
+ <method name="lightened">
+ <return type="Color">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ Returns a new color resulting from making this color lighter by the specified percentage (0-1).
+ [codeblock]
+ var green = Color(0.0, 1.0, 0.0)
+ var lightgreen = green.lightened(0.2) # 20% lighter than regular green
+ [/codeblock]
+ </description>
+ </method>
+ <method name="darkened">
+ <return type="Color">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ Returns a new color resulting from making this color darker by the specified percentage (0-1).
+ [codeblock]
+ var green = Color(0.0, 1.0, 0.0)
+ var darkgreen = green.darkened(0.2) # 20% darker than regular green
+ [/codeblock]
+ </description>
+ </method>
<method name="linear_interpolate">
<return type="Color">
</return>