Script:System/colors.js: Difference between revisions

From Spherical
Jump to navigation Jump to search
created from http://web.archive.org/web/20100621062552/http://www.spheredev.org/wiki/Colors.js_%28system_script%29
 
color list to table
 
Line 1: Line 1:
The [[Script:system|system script]] [[Script:system/colors.js|colors.js]] consists of eight Sphere [[API:color|color objects]] that represent the eight standard colors:
The [[Script:system|system script]] [[Script:system/colors.js|colors.js]] consists of eight Sphere [[API:color|color objects]] that represent the eight standard colors:


* <var>Black</var>
* <var>White</var>
* <var>Red</var>
* <var>Green</var>
* <var>Blue</var>
* <var>Cyan</var>
* <var>Magenta</var>
* <var>Yellow</var>
<!-- TODO: convert to table -->


==Usage==
==Usage==
{{usage|func=[[API:RequireSystemScript|RequireSystemScript]]|params="colors.js"}}
{{usage|func=[[API:RequireSystemScript|RequireSystemScript]]|params="colors.js"}}
{| class="wikitable" width="100%"
|+Colors defined by colors.js
|-
|width="25%" style="text-align:center; background:white; color:black;"|White
|width="25%" style="text-align:center; background:red; color:white;"|Red
|width="25%" style="text-align:center; background:green; color:white;"|Green
|width="25%" style="text-align:center; background:blue; color:white;"|Blue
|-
|style="text-align:center; background:black; color:white;"|Black
|style="text-align:center; background:magenta; color:white;"|Magenta
|style="text-align:center; background:yellow; color:black;"|Yellow
|style="text-align:center; background:cyan; color:black;"|Cyan
|}


==Example==
==Example==

Latest revision as of 20:34, 2 August 2013

The system script colors.js consists of eight Sphere color objects that represent the eight standard colors:


Usage

RequireSystemScript("colors.js");


Colors defined by colors.js
White Red Green Blue
Black Magenta Yellow Cyan

Example

RequireSystemScript("colors.js");
Rectangle(0, 0, 100, 100, Magenta);
FlipScreen();