mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-22 16:23:48 +02:00
Color Synopses
This commit is contained in:
22
color.scad
22
color.scad
@@ -16,10 +16,12 @@ use <builtins.scad>
|
||||
// Section: Coloring Objects
|
||||
|
||||
// Module: recolor()
|
||||
// Synopsis: Sets the color for attachable children and all their descendants.
|
||||
// Topics: Attachments
|
||||
// See Also: color_this(), hsl(), hsv()
|
||||
//
|
||||
// Usage:
|
||||
// recolor([c]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: color_this()
|
||||
// Description:
|
||||
// Sets the color for attachable children and all their descendants. This only works with attachables and you cannot
|
||||
// have any color() modules above it in any parents, only other recolor() or color_this() modules.
|
||||
@@ -43,10 +45,12 @@ module recolor(c="default")
|
||||
|
||||
|
||||
// Module: color_this()
|
||||
// Synopsis: Sets the color for children at the current level only.
|
||||
// Topics: Attachments
|
||||
// See Also: recolor(), hsl(), hsv()
|
||||
//
|
||||
// Usage:
|
||||
// color_this([c]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: recolor()
|
||||
// Description:
|
||||
// Sets the color for children at one level, reverting to the previous color for further descendants.
|
||||
// This works only with attachables and you cannot have any color() modules above it in any parents,
|
||||
@@ -72,6 +76,10 @@ module color_this(c="default")
|
||||
|
||||
|
||||
// Module: rainbow()
|
||||
// Synopsis: Iterates through a list, displaying children in different colors.
|
||||
// Topics: List Handling
|
||||
// See Also: hsl(), hsv()
|
||||
//
|
||||
// Usage:
|
||||
// rainbow(list,[stride],[maxhues],[shuffle],[seed]) CHILDREN;
|
||||
// Description:
|
||||
@@ -111,6 +119,9 @@ module rainbow(list, stride=1, maxhues, shuffle=false, seed)
|
||||
// Section: Colorspace Conversion
|
||||
|
||||
// Function&Module: hsl()
|
||||
// Synopsis: Sets the color of children to a specified hue, saturation, lightness and optional alpha channel value.
|
||||
// See Also: hsv(), recolor(), color_this()
|
||||
//
|
||||
// Usage:
|
||||
// hsl(h,[s],[l],[a]) CHILDREN;
|
||||
// rgb = hsl(h,[s],[l],[a]);
|
||||
@@ -146,6 +157,9 @@ module hsl(h,s=1,l=0.5,a=1)
|
||||
|
||||
|
||||
// Function&Module: hsv()
|
||||
// Synopsis: Sets the color of children to a hue, saturation, value and optional alpha channel value.
|
||||
// See Also: hsl(), recolor(), color_this()
|
||||
//
|
||||
// Usage:
|
||||
// hsv(h,[s],[v],[a]) CHILDREN;
|
||||
// rgb = hsv(h,[s],[v],[a]);
|
||||
|
Reference in New Issue
Block a user