User Tools

Site Tools


en:color

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
en:color [2020/11/22 20:54]
admin
en:color [2020/11/22 21:05]
admin
Line 7: Line 7:
 **color** [[rgb|rgb_expression]]\\ **color** [[rgb|rgb_expression]]\\
 **color** ( [[rgb|rgb_expression]] )\\ **color** ( [[rgb|rgb_expression]] )\\
-**color** [[string|svg_color_string]]\\ +**color** [[expression|svg_color_string]]\\ 
-**color** ( [[string|svg_color_string]] )\\+**color** ( [[expression|svg_color_string]] )\\
 **color** [[colorconstants|pen_color_name]] , [[colorconstants|brush_color_name]]\\ **color** [[colorconstants|pen_color_name]] , [[colorconstants|brush_color_name]]\\
 **color** ( [[colorconstants|pen_color_name]] , [[colorconstants|brush_color_name]] )\\ **color** ( [[colorconstants|pen_color_name]] , [[colorconstants|brush_color_name]] )\\
 **color** [[rgb|pen_rgb_expression]] , [[rgb|brush_rgb_expression]]\\ **color** [[rgb|pen_rgb_expression]] , [[rgb|brush_rgb_expression]]\\
-**color** ( [[rgb|pen_rgb_expression]] , [[rgb|brush_rgb_expression]] ) +**color** ( [[rgb|pen_rgb_expression]] , [[rgb|brush_rgb_expression]] )\\ 
-**color** [[string|pen_svg_color_string]], [[string|brush_svg_color_string]]\\ +**color** [[expression|pen_svg_color_string]], [[expression|brush_svg_color_string]]\\ 
-**color** ( [[string|pen_svg_color_string]], [[string|brush_svg_color_string]] )\\+**color** ( [[expression|pen_svg_color_string]], [[expression|brush_svg_color_string]] )\\
  
 ==== Description ==== ==== Description ====
  
-Sets the current drawing color to //colorname// or to an ARGB value where ( (a * 256 + r) * 256 + b) * 256 + g.  If a single color is specified both the pen and the brush will be set to the same color.+Sets the current drawing color to //colorname// or to an ARGB value where ((a * 256 + r) * 256 + g) * 256 + b.  If a single color is specified both the pen and the brush will be set to the same color.  There are 4 common ways to define a color in BASIC256: 
 + 
 +  - one of the defined color constants (see table below); 
 +  - an integer to define the color where ((a * 256 + r) * 256 + g) * 256 + b, 
 +    * a - transparency 0 = transparent to 255 = opaque 
 +    * r - red 0 = off to 255 = full on 
 +    * g - green 0 = off to 255 = full on 
 +    * b - blue 0 = off to 255 = full on 
 +  - the [[rgb|rgb]] function passing it 3 or 4 numbers from 0-255, 
 +  - or using an svg color definition string. 
  
 When drawing solid shapes ([[Chord|Chord]],[[Circle|Circle]],[[Pie|Pie]],[[Poly|Poly]],[[Rect|Rect]], and [[Stamp|Stamp]]) the border of the shape will be drawn with the pen color and the shape itself will be filled with the brush color.  A brush color of CLEAR is used to not fill a closed shape. When drawing solid shapes ([[Chord|Chord]],[[Circle|Circle]],[[Pie|Pie]],[[Poly|Poly]],[[Rect|Rect]], and [[Stamp|Stamp]]) the border of the shape will be drawn with the pen color and the shape itself will be filled with the brush color.  A brush color of CLEAR is used to not fill a closed shape.
en/color.txt · Last modified: 2020/11/22 21:26 by admin