Yeah, I was actually initially a champion of naming the theme colors, but it proved to be untenable. For example, imagine the color you might want to call buttonBackgroundColor. Well, that color is also the disabled background color of calendars, the grid color of meters, the highlight background color of table views, etc. So instead we went with the notion of a palette, a notion based on the design process of graphic designers. A typical graphic designer decides on a color palette and then choose colors from that palette without preconceived notions of how each color must be used.
Now that being said, the onus is on us Pivot developers to expose that palette to application developers. I had thought that I had included the palette in the javadoc but had forgotten. Here's a link to newly generated javadocs (not yet publicly linked to) that shows the default Terra palette and the indexes of the colors therein: http://incubator.apache.org/pivot/1.1/docs/api/pivot/wtk/skin/terra/package-summary.html. NOTE: I just posted this content -- it will take a few hours to work its way to all the mirrors (and in the meantime, it will return an HTTP 404). One problem right now is that it's impossible for application developers to provide custom palettes. I'll be checking in a fix to this soon. Finally, note that TerraTheme /does/ provide brighten(Color):Color and darken(Color):Color in its public API. Cheers, -T On Thu, Mar 19, 2009 at 9:31 AM, Greg Brown <[email protected]> wrote: > We actually talked about naming the colors, but there are so many different > possible color combinations that we didn't think names would be meaningful. I > believe we have a color palette that is meant to help navigate the indexes - > Todd can provide more information here. > > On Thursday, March 19, 2009, at 07:56AM, "Noel Grandin" > <[email protected]> wrote: >>Hi >> >>The JSON TerraTheme file is somewhat opaque. >> >>Can we have names or enums for the colours rather then indexes? >>And perhaps some more methods like TerraTheme#getColourDarker("xxxx"), >>TerraTheme#getColourBrighter("xxx") so that the mapping from the JSON >>file to code becomes more readable? >> >>I'm willing to whip a patch for this. >> >>Regards, Noel Grandin. >> >
