From 8e4336a7294f0cc31aa5ccfb2854c702aa86dcca Mon Sep 17 00:00:00 2001 From: Kyle Van Berendonck Date: Fri, 13 Oct 2017 15:49:31 +1100 Subject: Add Color.lightened and Color.darkened (like LESS.css or SASS) --- doc/classes/Color.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doc/classes') 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] + + + + + + + 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] + + + + + + + + + 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] + + -- cgit v1.2.3