<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to GettingStarted</title><link>https://sourceforge.net/p/pynguin/wiki/GettingStarted/</link><description>Recent changes to GettingStarted</description><atom:link href="https://sourceforge.net/p/pynguin/wiki/GettingStarted/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 15 Apr 2021 19:02:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pynguin/wiki/GettingStarted/feed" rel="self" type="application/rss+xml"/><item><title>GettingStarted modified by Lee Harr</title><link>https://sourceforge.net/p/pynguin/wiki/GettingStarted/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="install"&gt;Install&lt;/h1&gt;
&lt;p&gt;See the instructions in the README file.&lt;/p&gt;
&lt;p&gt;Windows users may want to look at InstallingPynguinOnWindows&lt;/p&gt;
&lt;h1 id="more-functions-video"&gt;More functions video&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=R2GsVM3ebns" rel="nofollow"&gt;https://www.youtube.com/watch?v=R2GsVM3ebns&lt;/a&gt;&lt;/p&gt;
&lt;h1 id="interface"&gt;Interface&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;left side&lt;/strong&gt; (The canvas) The pynguin lives over here. Give commands and write programs and watch the pynguin move around and draw here.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;top right&lt;/strong&gt; (Code editor) Write programs and create new functions for the pynguin here.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;bottom right&lt;/strong&gt; (Interactive console) Give commands here.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="commands"&gt;Commands&lt;/h1&gt;
&lt;h2 id="draw"&gt;draw&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;forward(distance)&lt;/code&gt; : Move the pynguin ahead by the given distance. &lt;em&gt;distance&lt;/em&gt; should be a number.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fd(distance)&lt;/code&gt; : Same as &lt;code&gt;forward(distance)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;backward(distance)&lt;/code&gt; : Move the pynguin back by the given distance.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;bk(distance)&lt;/code&gt; : Same as &lt;code&gt;backward(distance)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;lineto(x, y)&lt;/code&gt; : Draw a line from the current location to the given coordinates. Line is drawn even if pen has been deactivated with &lt;code&gt;penup()&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;penup()&lt;/code&gt; : Deactivate the pen. Makes the pynguin not draw while moving.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pendown()&lt;/code&gt; : Activate the pen. The pynguin will draw lines while moving.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;speed(string)&lt;/code&gt; : Change how quickly the pynguin moves around the drawing. Choices available are: &lt;code&gt;'slow'&lt;/code&gt;, &lt;code&gt;'medium'&lt;/code&gt;, &lt;code&gt;'fast'&lt;/code&gt;, &lt;code&gt;'instant'&lt;/code&gt;. Note that &lt;code&gt;'instant'&lt;/code&gt; really means 'as fast as possible'.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;track()&lt;/code&gt; : Keep the pynguin centered in the view as it moves around. Note that it is only the main pynguin that will be tracked, even if it is a different pynguin that calls the &lt;code&gt;track()&lt;/code&gt; method. To track a different pynguin, &lt;code&gt;promote()&lt;/code&gt; it first.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;notrack()&lt;/code&gt; : Stop tracking the main pynguin.&lt;/p&gt;
&lt;h2 id="turn"&gt;turn&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;right(degrees)&lt;/code&gt; : Turn clockwise by given angle. &lt;em&gt;degrees&lt;/em&gt; should be a number.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rt(degrees)&lt;/code&gt; : Same as &lt;code&gt;right(degrees)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;left(degrees)&lt;/code&gt; : Turn counter-clockwise by given angle.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;lt(degrees)&lt;/code&gt; : Same as &lt;code&gt;left(degrees)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;turnto(degrees)&lt;/code&gt; : Set the heading to the given angle.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;h(degrees)&lt;/code&gt; : Same as &lt;code&gt;turnto(degrees)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;toward(x, y)&lt;/code&gt; : Turn to face the given coordinates.&lt;/p&gt;
&lt;p&gt;See also: &lt;a class="" href="#markdown-header-properties"&gt;Properties&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="move"&gt;move&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;goto(x, y)&lt;/code&gt; : Move to the given coordinates. No line is drawn, no matter what the current state of the pen is.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;xy(x, y)&lt;/code&gt; : Same as &lt;code&gt;goto(x, y)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;home()&lt;/code&gt; : Move to the home location &lt;code&gt;(0, 0)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;reset()&lt;/code&gt; : Clear the canvas and set all pynguin attributes to their initial conditions.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;clear()&lt;/code&gt; : Remove anything that was drawn by the main pynguin.&lt;/p&gt;
&lt;p&gt;See also: &lt;a class="" href="#markdown-header-properties"&gt;Properties&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="info"&gt;info&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;xy()&lt;/code&gt; : Return the current location as a 2-tuple.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;xyh()&lt;/code&gt; : Return the current location and heading as a 3-tuple.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;h()&lt;/code&gt; : Return the current heading.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;distance(x, y)&lt;/code&gt; : Return the distance to the given coordinate.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;xyforward(distance)&lt;/code&gt; : Return the location where the pynguin would be if it went &lt;code&gt;forward(distance)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;onscreen()&lt;/code&gt; : Return True if the pynguin is positioned on the canvas.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;viewcoords()&lt;/code&gt; : Return the coordinates of the corners of the canvas as a 4-tuple &lt;code&gt;(xmin, ymin, xmax, ymax)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;See also: &lt;a class="" href="#markdown-header-properties"&gt;Properties&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="style"&gt;style&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;color(string)&lt;/code&gt; : Change the color of drawn lines. &lt;em&gt;string&lt;/em&gt; can be the name of a color (like &lt;code&gt;'red'&lt;/code&gt;, &lt;code&gt;'green'&lt;/code&gt;, &lt;code&gt;'blue'&lt;/code&gt;) or an html-style hex color triple (like &lt;code&gt;'#FF0000'&lt;/code&gt;, &lt;code&gt;'#00FF00'&lt;/code&gt;, &lt;code&gt;'#0000FF'&lt;/code&gt;) or choose a random color with the word &lt;code&gt;'random'&lt;/code&gt;. (Can also choose a light, medium or dark random color with &lt;code&gt;'rlight'&lt;/code&gt;, &lt;code&gt;'rmedium'&lt;/code&gt;, or &lt;code&gt;'rdark'&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;color(red, green, blue)&lt;/code&gt; : Change the color of drawn lines. Each of &lt;em&gt;red&lt;/em&gt;, &lt;em&gt;green&lt;/em&gt;, and &lt;em&gt;blue&lt;/em&gt; should be an integer between 0 and 255.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;bgcolor(string)&lt;/code&gt; : Set the background color. Color choices are the same as those for &lt;code&gt;color(string)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;bgcolor(red, green, blue)&lt;/code&gt; : Set the background color.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;width(px)&lt;/code&gt; : Change the width of drawn lines to the specified size. &lt;em&gt;px&lt;/em&gt; should be a number.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fill()&lt;/code&gt; : Add color to the interior space of drawn lines. (Also, &lt;code&gt;fill(True)&lt;/code&gt; works.)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fill(color=...)&lt;/code&gt; : Start filling, and also change the fill color. The color parameter can be a string as in calling &lt;code&gt;color(string)&lt;/code&gt; or a 3-tuple of &lt;code&gt;(red, green, blue)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nofill()&lt;/code&gt; : Turn off filling. (Can also use &lt;code&gt;fill(False)&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;font()&lt;/code&gt; : Return the current font object being used to draw text. This is a Qt font and methods can be called on it to change the font style.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;font(family=..., size=..., weight=..., italic=...)&lt;/code&gt; : Some characteristics of the current font can be set this way. family is a string like 'Arial' or 'Courier', size is a number, weight is a number between 0 and 99, italic is a boolean.&lt;/p&gt;
&lt;h1 id="shapes-and-random-colors-video"&gt;Shapes and random colors video&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=7SNNQi7Lw2E" rel="nofollow"&gt;https://www.youtube.com/watch?v=7SNNQi7Lw2E&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="shapes"&gt;shapes&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;circle(radius, center?)&lt;/code&gt; : Draw a circle with given &lt;em&gt;radius&lt;/em&gt;. If &lt;em&gt;center&lt;/em&gt; is included and is &lt;code&gt;True&lt;/code&gt;, center the circle on the current location.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;arc(radius, extent, center?, move?, pie?)&lt;/code&gt; : Draw a circular arc with given &lt;em&gt;radius&lt;/em&gt; and &lt;em&gt;extent&lt;/em&gt;. If &lt;em&gt;center&lt;/em&gt; is &lt;code&gt;True&lt;/code&gt; the arc will be centered on the initial location. If &lt;em&gt;move&lt;/em&gt; is &lt;code&gt;True&lt;/code&gt; the pynguin will either go to the end of the drawn arc, or if &lt;em&gt;center&lt;/em&gt; is also &lt;code&gt;True&lt;/code&gt; will finish facing towards the end of the drawn arc. If &lt;em&gt;pie&lt;/em&gt; is &lt;code&gt;True&lt;/code&gt; the arc will be the circular edge of a pie-shaped figure.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;square(size, center?)&lt;/code&gt; : Draw a square with side length &lt;em&gt;size&lt;/em&gt;. If &lt;em&gt;center&lt;/em&gt; is included and is &lt;code&gt;True&lt;/code&gt;, center the square on the current location.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rect(side1, side2, center?)&lt;/code&gt; : Draw a rectangle with sides length &lt;em&gt;side1&lt;/em&gt; and &lt;em&gt;side2&lt;/em&gt;. If &lt;em&gt;center&lt;/em&gt; is included and is &lt;code&gt;True&lt;/code&gt;, center the rectangle on the current location. The rectangle will be oriented with side1 parallel to the current direction, and side2 perpendicular.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ellipse(radius1, radius2, center?)&lt;/code&gt; : Draw an ellipse with characteristic lengths &lt;em&gt;radius1&lt;/em&gt; and &lt;em&gt;radius2&lt;/em&gt;. The ellipse will be aligned with the current direction and will be a total of &lt;em&gt;2&lt;/em&gt; * &lt;em&gt;radius1&lt;/em&gt; long in one direction and &lt;em&gt;2&lt;/em&gt; * &lt;em&gt;radius2&lt;/em&gt; long in the perpendicalar direction. If &lt;em&gt;center&lt;/em&gt; is included and is &lt;code&gt;True&lt;/code&gt;, the ellipse will be centered on the current location.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;earc(radius1, radius2, extent, center?, move?, pie?)&lt;/code&gt; : Draw an elliptical arc. The shape and location will be the same as the ellipse with the same &lt;em&gt;radius1&lt;/em&gt;, &lt;em&gt;radius2&lt;/em&gt;, and &lt;em&gt;center&lt;/em&gt;. Drawing begins in the middle of one of the &lt;em&gt;radius1&lt;/em&gt; arcs, and proceeds through a polar transform &lt;em&gt;extent&lt;/em&gt; degrees. If &lt;em&gt;move&lt;/em&gt; is included and &lt;code&gt;True&lt;/code&gt;, the pynguin will end up at the end of the drawn arc (if not &lt;em&gt;center&lt;/em&gt;) or facing the end of the drawn arc. If &lt;em&gt;pie&lt;/em&gt; is &lt;code&gt;True&lt;/code&gt; lines will be drawn from the center to both ends of the arc.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;write(text)&lt;/code&gt; : Draw the given &lt;em&gt;text&lt;/em&gt; string at the current location.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;avatar(string)&lt;/code&gt; : Set the pynguin's onscreen representation to the given choice. Choices for &lt;em&gt;string&lt;/em&gt; include &lt;code&gt;'pynguin'&lt;/code&gt;, &lt;code&gt;'arrow'&lt;/code&gt;, &lt;code&gt;'robot'&lt;/code&gt;, and &lt;code&gt;'turtle'&lt;/code&gt;. Custom avatars can also be set this way. For help with the syntax, try using the &lt;code&gt;View -&amp;gt; Custom -&amp;gt; Add new avatar&lt;/code&gt; option from the menu first.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;stamp()&lt;/code&gt; : Draw a copy of the current avatar at the current location.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;stamp(string)&lt;/code&gt; : Draw a copy of the given avatar at the current location. Choices for &lt;em&gt;string&lt;/em&gt; include &lt;code&gt;'pynguin'&lt;/code&gt;, &lt;code&gt;'arrow'&lt;/code&gt;, &lt;code&gt;'robot'&lt;/code&gt;, and &lt;code&gt;'turtle'&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="properties"&gt;Properties&lt;/h2&gt;
&lt;p&gt;Each Pynguin object also has a set of values that can be accessed or set.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;x&lt;/code&gt; : get or set the x-coordinate&lt;/p&gt;
&lt;p&gt;&lt;code&gt;y&lt;/code&gt; : get or set the y-coordinate&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pos&lt;/code&gt; : get or set both x- and y- coordinates&lt;/p&gt;
&lt;p&gt;&lt;code&gt;heading&lt;/code&gt; : get or set the heading&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ang&lt;/code&gt; : Same as heading&lt;/p&gt;
&lt;h1 id="multiple-pynguins"&gt;Multiple Pynguins&lt;/h1&gt;
&lt;p&gt;You can have more than one pynguin active at any time. Make sure that you keep a reference to any additional pynguins so that you can control them.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Pynguin&lt;/code&gt; : instantiate or subclass this class for additional pynguin objects. Keep a reference for later use:  &lt;code&gt;p2 = Pynguin(); p2.fd(100)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pyn.remove()&lt;/code&gt; : Pynguin method for discarding the given &lt;code&gt;Pynguin&lt;/code&gt; object. Also removes everything the pynguin has drawn. If the discarded pynguin was the main pynguin, the next oldest will be promoted to be the main pynguin. That means that the non-qualified commands will control the newly promoted pynguin. For instance if p2 has been promoted, &lt;code&gt;fd(100)&lt;/code&gt; will be the same as &lt;code&gt;p2.fd(100)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pyn.promote(other_pyn)&lt;/code&gt; : Make other_pyn be the main pynguin. Note that it is not necessary for the main pynguin to perform this command. For instance, &lt;code&gt;any_pyn.promote(any_pyn)&lt;/code&gt; is a legal way for any pynguin to promote itself to be the main pynguin.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;reap()&lt;/code&gt; : remove all other pynguins after first taking ownership of everything the pynguin has drawn. Note the difference between &lt;code&gt;reap()&lt;/code&gt; and &lt;code&gt;remove()&lt;/code&gt; is that &lt;code&gt;reap()&lt;/code&gt; will leave the current drawing unchanged.&lt;/p&gt;
&lt;h1 id="util-module"&gt;util module&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;util&lt;/code&gt; module is pulled in to the default namespace automatically. There is no need to &lt;code&gt;import util&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="functions"&gt;functions&lt;/h2&gt;
&lt;h3 id="choose_color"&gt;&lt;code&gt;choose_color()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Used internally by all other functions that take a &lt;code&gt;color&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Note: Must access as &lt;code&gt;util.choose_color()&lt;/code&gt; (or pull it in with eg. &lt;code&gt;cc = util.choose_color&lt;/code&gt; and then access as &lt;code&gt;cc()&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;choose_color()&lt;/code&gt; : Return the RGBA value of a chosen color. Provides several ways to select a color. This function is used by pynguin methods like &lt;code&gt;color()&lt;/code&gt; and &lt;code&gt;bgcolor()&lt;/code&gt; but it may be useful to call it directly. Note that &lt;code&gt;choose_color()&lt;/code&gt; does not actually set any colors, it only returns the RGB values that can be passed to the color setting methods.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;choose_color(string)&lt;/code&gt; : string can be the name of a color, like &lt;code&gt;'red'&lt;/code&gt;, &lt;code&gt;'orange'&lt;/code&gt;, or &lt;code&gt;'light blue'&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;choose_color(string)&lt;/code&gt;: string can be one of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;'random'&lt;/code&gt; = completely random, but with 100% alpha channel&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;'rlight'&lt;/code&gt; = random, from the lighter (brighter) colors&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;'rmedium'&lt;/code&gt; = random, from the mid-range colors&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;'rdark'&lt;/code&gt; = random, from the darker colors&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;'ralpha'&lt;/code&gt; = random, but also randomizes alpha channel (between 100-200)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;choose_color(r, g, b)&lt;/code&gt; : returns R, G, B, (A=255). Values will be clamped 0-255.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;choose_color(r, g, b, a)&lt;/code&gt; : Similar to &lt;code&gt;choose_color(r, g, b)&lt;/code&gt; but with an alpha (transparency) value set also. All values will be clamped 0-255.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;choose_color([r=&amp;lt;val&amp;gt;], [g=&amp;lt;val&amp;gt;], [b=&amp;lt;val&amp;gt;], [a=&amp;lt;val&amp;gt;])&lt;/code&gt; : return clamped RGBA values as specified. Unspecified components will be returned as None.&lt;/p&gt;
&lt;h3 id="nudge_color"&gt;&lt;code&gt;nudge_color()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Note: Must access as &lt;code&gt;util.nudge_color()&lt;/code&gt; (or pull it in with eg. &lt;code&gt;nc = util.nudge_color&lt;/code&gt; and then access as &lt;code&gt;nc()&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nudge_color()&lt;/code&gt; : Return the RGB values of a color that has been modified in the specified way. Note that &lt;code&gt;nudge_color()&lt;/code&gt; does not actually set any colors, it only returns a tuple of RGBA values that can be passed to the color setting methods.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nudge_color(color, r=val, g=val, b=val)&lt;/code&gt; : Starting from the initial color which must be a 3-tuple (or 4-tuple as returned by the &lt;code&gt;color()&lt;/code&gt; method) adjust the color by the given amounts. r, g, and b are all optional. Adds the given value to the selected component. For example, if &lt;code&gt;c = color() = (100, 100, 100, 255)&lt;/code&gt; then &lt;code&gt;nudge_color(c, r=10, b=-5.5)&lt;/code&gt; will return &lt;code&gt;(110, 100, 94.5, 255)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nudge_color(color, r='dr%', g='dg%', b='db%')&lt;/code&gt; : Starting from the initial color which must be a 3-tuple (or 4-tuple as returned by the &lt;code&gt;color()&lt;/code&gt; method) adjust the color by the given percents. r, g, and b are all optional. For example, if &lt;code&gt;c = color() = (100, 100, 100)&lt;/code&gt; then &lt;code&gt;nudge_color(c, r='10%', b='150%')&lt;/code&gt; will return &lt;code&gt;(10, 100, 150)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Note that numbers and percents can be mixed freely in &lt;code&gt;nudge_color()&lt;/code&gt; so that for instance, if &lt;code&gt;c = color() = (100, 100, 100)&lt;/code&gt; then &lt;code&gt;nudge_color(c, r=-20, g='99%', b='105%')&lt;/code&gt; will return &lt;code&gt;(80, 99, 105)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also note that the pynguin will keep track of non-integer color values, but the actual colors set will be restricted to integer values. This allows smoother for nudging of colors while maintaining the requirement of integer color component values.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lee Harr</dc:creator><pubDate>Thu, 15 Apr 2021 19:02:23 -0000</pubDate><guid>https://sourceforge.netc51860ef4b7480b19f9e4b346279277a0fee7f78</guid></item></channel></rss>