How would we score changing the colors of graphs in Desmos in [graphical-output] challenges with color-sensitive output? Currently, selecting the color in the menu costs no bytes as no characters are used to do it. This has raised some concerns about being "unfair" when competing with languages where the color is defined in the text.

Should there be a penalty for setting the color of a graph? If so, what should the penalty be?

  • 2
    \$\begingroup\$ I think this is putting the cart before the horse. The first question has to be whether answers in Desmos are valid at all given that it appears to be neither a programming language nor capable of saving source code. \$\endgroup\$ – Peter Taylor Apr 23 '19 at 16:27
  • \$\begingroup\$ @PeterTaylor Desmos answers are valid \$\endgroup\$ – Benjamin Urquhart Apr 23 '19 at 16:38

Setting the color is not part of the language

As defined here, there is no way to encode the color. This means that the color of the graph is not part of the language, similar to how setting the default font color in my terminal settings isn't part of bash.

If color is required as part of the answer, then there must be a way to encode this color in a way that the website understands. For example, if the site is able to save/load the graph (including colors) from the browser cache, you can use that as your code (and you would measure the byte count of the saved data).

  • \$\begingroup\$ Looking at the browser console, it appears that the hex colors are hardcoded into the html as button attributes in the form #rrggbb. \$\endgroup\$ – Benjamin Urquhart Apr 23 '19 at 17:16
  • \$\begingroup\$ @BenjaminUrquhart I took a brief look at the website, and it looks like there is saving functionality. If you are able to save the color, then it's definitely possible. It's simply a matter of figuring out how it is saving it, and then measuring the bytes of the saved graph. \$\endgroup\$ – Nathan Merrill Apr 23 '19 at 19:30
  • 1
    \$\begingroup\$ One other side note: I noticed that the site automatically selects colors. If you are able to order the code such that the automatically selected colors are the right ones, then that would work as well. \$\endgroup\$ – Nathan Merrill Apr 23 '19 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .