What colors are traces of the Python3 turtle? Can we write them in the RGB system?



  • Objective:
    Find a way to paint the skull with the largest number of flowers.

    I'm doing the program. Connected the module. turtle Looking for a way to give a new color to the turtle. yellow, green, redetc.). Such a question: Can any other colour code be given any shades that are not in colour standards? If not, is there a list? of All turtle flowers?



  • All the answer is found. Function help(turtle.color) gave the following information on the colour of the turtle:

    Help on function color in module turtle:
    

    color(*args)
    Return or set the pencolor and fillcolor.

    Arguments:
    Several input formats are allowed.
    They use 0, 1, 2, or 3 arguments as follows:

    color()
    Return the current pencolor and the current fillcolor
    as a pair of color specification strings as are returned
    by pencolor and fillcolor.
    color(colorstring), color((r,g,b)), color(r,g,b)
    inputs as in pencolor, set both, fillcolor and pencolor,
    to the given value.
    color(colorstring1, colorstring2),
    color((r1,g1,b1), (r2,g2,b2))
    equivalent to pencolor(colorstring1) and fillcolor(colorstring2)
    and analogously, if the other input format is used.

    If turtleshape is a polygon, outline and interior of that polygon
    is drawn with the newly set colors.
    For mor info see: pencolor, fillcolor

    Example:
    >>> color('red', 'green')
    >>> color()
    ('red', 'green')
    >>> colormode(255)
    >>> color((40, 80, 120), (160, 200, 240))
    >>> color()
    ('#285078', '#a0c8f0')

    Which means that the colors can be recorded as HEX-format (and that's what I need)


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2