User Tools

Site Tools


ro:color

This is an old revision of the document!


Color (Instrucțiune)

Engleză: COLOR = culoare

Format

Descriere

Stabilește culoarea cu care se desenează.

Forme geometrice închise

Când se desenează forme geometrice închise (Chord, Circle, Pie, Poly, Rect sau Stamp), conturul formei va fi desenat cu culoarea creionului, iar forma va fi umplută cu culoarea pensulei. Dacă se specifică o singură culoare, atunci atât culoarea creionului cât și culoarea pensulei vor fi stabilite la aceeași valoare. Pentru a evita umplerea formei (atunci când se dorește desenarea doar a conturului formei) se va folosi pentru pensulă culoarea CLEAR (transparent). Dacă atât culoarea creionului cât și culoarea pensulei sunt stabilite la culoarea CLEAR (transparent), atunci, în loc să se deseneze forma geometrică, acesta va șterge pixelii (îi va face transparenți), comportându-se ca o gumă de șters.

Forme geometrice închise

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. When drawing solid shapes (Chord,Circle,Pie,Poly,Rect, and 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. If the current pen and brush are both set to CLEAR the pixels or shapes drawn will clear the pixels of the graphics output area and make them transparent. This is especially useful when creating sprites using the Spriteslice command.

Nume constantăValori ARGBNumăr în HEXANumăr întreg Traducere din engleză
BLACK255, 0, 0, 00xff000000 -16777216BlackBLACK = negru
WHITE255, 255, 255, 2550xffffffff -1WhiteWHITE = alb
RED255, 255, 0, 00xffff0000 -65536redRED = roșu
DARKRED255, 128, 0, 00xff800000 -8388608darkredDARK RED = roșu-închis
GREEN255, 0, 255, 00xff00ff00 -16711936greenGREEN = verde
DARKGREEN255, 0, 128, 00xff008000 -16744448darkgreenDARK GREEN = verde-închis
BLUE255, 0, 0, 2550xff0000ff -16776961blueBLUE = albastru
DARKBLUE255, 0, 0, 1280xff000080 -16777088darkblueDARK BLUE = albastru-închis
CYAN255, 0, 255, 2550xff00ffff -16711681cyanCYAN = turcoaz
DARKCYAN255, 0, 128, 1280xff008080 -16744320darkcyanDARK CYAN = turcoaz-închis
PURPLE255, 255, 0, 2550xffff00ff -65281purplePURPLE = violet, magenta
DARKPURPLE255, 128, 0, 1280xff800080 -8388480darkpurpleDARK PURPLE = violet-închis, magenta-închis
YELLOW255, 255, 255, 00xffffff00 -256yellowYELLOW = galben
DARKYELLOW255, 128, 128, 00xff808000 -8355840darkyellowDARK YELLOW = galben-închis
ORANGE255, 255, 102, 00xffff6600 -39424orangeORANGE = portocaliu
DARKORANGE255, 176, 61, 00xffb03d00 -5227264darkorangeDARK ORANGE = portocaliu-închis
GREY / GRAY255, 164, 164, 1640xffa4a4a4 -5987164greyGREY = negru
DARKGREY / DARKGRAY255, 128, 128, 1280xff808080 -8355712darkgreyDARK GREY, DARK GRAY = gri-închis
CLEAR0, 0, 0, 00x00000000 0 CLEAR = transparent
2017/08/25 04:23 · junior-root

Deprecated Form

In version 0.9.9.26 the statement form “color red, blue, green” or “color ( red, blue, green )” was deprecated and a warning will be displayed when it is encountered. It should be replaced with “color rgb ( red, blue, green )”.

Exemplu

clg
color rgb(128,128,128)
rect 0,0,graphwidth, graphheight
penwidth 5
color green,red
circle 100,100,50
penwidth 1
color rgb(255,160,160)
circle 100,100,25

Will draw a grey rectangle with a green circle filled with red and then a pink circle inside it.
Color

Vezi și

2016/01/01 22:49

Istoric

0.9.5madded “COLOR r,g,b” form and numeric representation of color names
0.9.9.26Added brush color and deprecated the “COLOR r,g,b”.
0.9.9.28Changed color values to include Alpha (transparency) and changed color constants to new ARGB values.
0.9.9.45changed values to positive numbers following formula as documented.
ro/color.1503700263.txt.gz · Last modified: 2020/02/28 10:46 (external edit)