Skip to content
lsl.devlsl.devLSL Dev

Template:ColorMath

Parameters:
  • 1 = r [0, 255]
  • 2 = g [0, 255]
  • 3 = b [0, 255]
  • hex=rrggbb (no "#" prefix is allowed on this template!)
Output:
  • {{#var:hex}} - html style color integer, without "#"
  • {{#var:vector}} - LSL style vector with values [0, 1]
ColorMath: {{ColorMath|hex=001f3f}} - LSL Hex/Write: {{LSL Hex/Write||chars=2}}LSL Hex/Write: {{LSL Hex/Write||chars=2}}LSL Hex/Write: {{LSL Hex/Write||chars=2}} - <padright:: {{padright:||0}}, padright:: {{padright:||0}}, padright:: {{padright:||0}}>
ColorMath: {{ColorMath|0|31|63}} - LSL Hex/Write: {{LSL Hex/Write||chars=2}}LSL Hex/Write: {{LSL Hex/Write||chars=2}}LSL Hex/Write: {{LSL Hex/Write||chars=2}} - <padright:: {{padright:||0}}, padright:: {{padright:||0}}, padright:: {{padright:||0}}>
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from Template:ColorMath, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.