Calico
Calico

Reputation: 57

Using Hex Codes for Colours in ACM Graphics API

I am writing a simple program using the ACM Graphics API, and am trying to use the setColor() method to set the color of a turtle. How do I have it use a hex code rather than a Color.COLOR mode because that does not have my color.

Upvotes: 2

Views: 352

Answers (1)

Reimeus
Reimeus

Reputation: 159844

You could do

gObject.setColor(Color.decode("0x054628")); // turtle green

Upvotes: 2

Related Questions