Why is there no brown color in Java's Color class? [closed]

Why is there no built-in brown color in Java's Color class? Sure I can make it myself, but it seems like a common enough color that should be available already.

3

1 Answer

Short version: Because the Java team think that extra color constants are not needed. They clearly said so in 2012!


This is one of the few case where there is actually a clearly documented answer1 to a "Java design" type question.

The following RFE was opened in 2010 against Java 6:

  • "additional java.awt.Color constants requested for great justice" :

where the requestor proposed adding 10 new constants to assist in developing "chromatically diverse" user interfaces. He also provided a "helpful" link to a Wikipedia page on X11 color names.

The RFE was declined with the comment:

"We've got along fine without these for about 14 years and I don't see a need for them now."

By extension, requests for (say) "Brown" should get the same response.


1 - I imagine that were also a "slippery slopes" arguments that hypothesizes a never ending stream of RFEs asking for yet more convenience color constants, or Bugs saying that color's X's attributes are wrong / inconsistent with X11 / inconsistent with CSS / "look wrong on my screen", etc.

You Might Also Like