drawBox Colors List


Is there a list of drawBox valid colors? Right now I’m just guessing which colors are available by default.


Here you go:



Thanks @Grasshopper_Frankie for including a few colors and their abbreviations. The link was helpful as well. I am interested in colors, so this is useful.


In the app, you can use any of those strings inside of drawBox(). It will also accept 'black', 'gray', 'grey', and 'purple'. You can also give it an object that has red, green, and blue properties.

It can also use a string as a hex color, something like '#4286F4'. This is actually 3 numbers put together representing the red, green, and blue values:

  red: 42
  green: 86
  blue: F4

Except the numbers are given in base 16 instead of base 10. To count to 17 in base 16, it goes: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10. That means the equivalent object for '#4286F4' would actually look like:

  red: 66
  green: 134
  blue: 244


List of Colors for Coding in Grasshopper

@Grasshopper_Frankie Thank for this thorough answer. Greatly appreciated:grin: I do want to experiment with different color combinations. I originally started learning JS through simple graphic art projects (but that was some time ago, so I forgot alot of JS).