donkirkby/live-py-plugin

Bad colours

Closed this issue · 0 comments

What I did

Used an unknown colour name in turtle graphics.

import turtle as t

t.pensize(5)
t.color('red')
t.forward(50)
t.right(90)
t.color('brightyellow')
t.forward(100)

What happened

It ignored the "brightyellow" colour, and continued drawing. The vertical line was black in PyCharm, and red in the browser.

What I wanted to happen

Raise an error, like when I run the code in regular Python:

turtle.TurtleGraphicsError: bad color string: brightyellow

My environment

Describe the versions of everything you were using:

  • Editor PyCharm 2021.3 and Chrome 96.0.4664.93
  • Live Coding plugin 4.5.1 / 4.6.0
  • Ubuntu 20.04
  • Python 3.9.9