xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Douglas" <edoug...@blockhouse.com>
Subject RE: Thinking about color
Date Tue, 15 Jun 2010 18:26:00 GMT
Maybe I'm not quite sure what you're getting at, maybe it takes a color
expert?  All I know is I tried using names for those colors and ran into
a couple of issues.
For one it didn't seem to like the brown, but of course I wanted to make
it more dynamic to compute colors for the possibility of many pie
pieces, but here's what I started with.

          <xsl:when test="$i=1">orangered</xsl:when>
          <xsl:when test="$i=2">cornflowerblue</xsl:when>
          <xsl:when test="$i=3">yellow</xsl:when>
          <xsl:when test="$i=4">lightgreen</xsl:when>
          <xsl:when test="$i=5">blueviolet</xsl:when>
          <xsl:when test="$i=6">chartreuse</xsl:when>
          <xsl:when test="$i=7">deepskyblue</xsl:when>
** for some reason light brown causes extreme delay on output create
          <xsl:when test="$i=8">lightbrown</xsl:when>
          <xsl:when test="$i=9">aquamarine</xsl:when>
          <xsl:when test="$i=10">pink</xsl:when>
          <xsl:when test="$i=11">cornflowerblue</xsl:when>
          <xsl:when test="$i=12">lightyellow</xsl:when>
          <xsl:when test="$i=13">burlywood</xsl:when>
          <xsl:when test="$i=14">cornflowerblue</xsl:when>
          <xsl:when test="$i=15">cornsilk</xsl:when>

-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Tuesday, June 15, 2010 2:20 PM
To: general@xmlgraphics.apache.org
Subject: Re: Thinking about color

Thanks, Eric. Actually, I'm talking about more than just sRGB which is
already sufficiently implemented in both Batik and FOP. What I'm trying
to cover are device-specific colors, CIE-family colors and foremost
named colors (spot colors).

On 15.06.2010 20:12:57 Eric Douglas wrote:
> Color works fine for me in FOP.
> I looked up default color names on the web and found these weird 
> things, from cornflowerblue to burlywood.
> I just use a value of RGB(#,#,#) on the fill attribute in the svg
> Of course being a programmer I prefer to use the numbers to calculate 
> the colors rather than putting in goofy names.
> I copied some SVG code for a pie chart from some web page and replaced

> the color section (attempting to make the color of each slice 
> distinguishable from the next) with:
>           <xsl:when test="$i=1">rgb(255,127,127)</xsl:when>
>           <xsl:when test="$i=2">rgb(127,127,255)</xsl:when>
>           <xsl:when test="$i=3">rgb(255,255,127)</xsl:when>
>           <xsl:when test="$i=4">rgb(191,64,255)</xsl:when>
>           <xsl:when test="$i=5">rgb(127,255,127)</xsl:when>
>           <xsl:when test="$i=6">rgb(255,191,64)</xsl:when>
>           <xsl:when test="$i=7">rgb(223,95,191)</xsl:when>
>           <xsl:when test="$i=8">rgb(127,191,191)</xsl:when>
>           <xsl:when test="$i=9">rgb(255,223,32)</xsl:when>
>           <xsl:when test="$i=10">rgb(159,95,255)</xsl:when>
>           <xsl:when test="$i=11">rgb(191,255,127)</xsl:when>
>           <xsl:when test="$i=12">rgb(255,223,95)</xsl:when>
>           <xsl:when test="$i=13">rgb(239,111,223)</xsl:when>
>           <xsl:when test="$i=14">rgb(127,159,223)</xsl:when>
>           <xsl:when test="$i=15">rgb(255,239,79)</xsl:when>
>           <xsl:otherwise><xsl:value-of 
> select="concat('rgb(',string(255
> - (($i - 15) * 32)),',',string(255 - (($i - 15) * 32)),',',string(255 
> - (($i - 15) * 32)),')')"/></xsl:otherwise>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Tuesday, June 15, 2010 2:02 PM
> To: batik-dev@xmlgraphics.apache.org; fop-dev@xmlgraphics.apache.org; 
> general@xmlgraphics.apache.org
> Subject: Thinking about color
> Folks,
> if you haven't seen it, yet, I've started to write down some notes on 
> handling color on the Wiki which applies to both Batik and FOP:
> http://wiki.apache.org/xmlgraphics/ColorHandling
> This is mostly triggered by my wanting to add support for named colors

> in SVG and FO. I'm grateful for feedback from anyone who knows a few 
> things about colors. I'm especially hoping for Thomas to chime in 
> since her works for a color-phile company. ;-)
> Discussion on general@ please.
> Thanks,
> Jeremias Maerki

Jeremias Maerki

To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org

To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org

View raw message