Welcome to OpenXML Developer Sign in | Join | Help

Colour Transforms in DrawingML

Last post 06-25-2008, 3:33 PM by Andrea. 1 replies.
Sort Posts: Previous Next
  •  06-25-2008, 12:31 AM 3397

    Colour Transforms in DrawingML

    Hi,

    A color transform is a modification to related properties of an underlying color.
    Related properties means that can change the colour in different ways.
    For example, transparency is a property that is related to color. Color transforms
    are specified as child tags off any color model's tag.
    Colour transforms can be applied for fill color,line color,font colour etc.

    The following are the allowed colour transforms.How they are represented in xml is
    also described alongwith.

    1.tint:
    Yields a lighter version of its input color. A 10% tint is 10% of the input color combined with 90% white.
    val 0 means it will be 100% white.Possible values are from 0 to 100000
    <a:schemeClr val="accent1">
                <a:tint val="0"/>
              </a:schemeClr>

    2.shade:
    Yields a darker version of its input color. A 10% shade is 10% of the input color combined with
    90% black.
    <a:schemeClr val="accent1">
                <a:shade val="50000"/>
              </a:schemeClr>

    3.comp:
    from spec ECMA-376:
    [that the color rendered should be the complement of its input color with the complement
    being defined as such. Two colors are called complementary if, when mixed they produce a shade of grey. For
    instance, the complement of red which is RGB (255, 0, 0) is cyan which is RGB (0, 255, 255).]
    <a:schemeClr val="accent1">
                <a:comp/>
              </a:schemeClr>

    4.alpha:
    specifies its input color with the specific opacity, but with its color unchanged.
    Possible values are from 0 to 100000

    <a:srgbClr val="00FF00">
    <a:alpha val="50000"/>
    </a:srgbClr>

     

    Other possible colour transforms are:lum,hue,sat,red,green,hue,blueMod,blueOff etc.

    Mallika


     

  •  06-25-2008, 3:33 PM 3403 in reply to 3397

    Re: Colour Transforms in DrawingML

    Yields a lighter version of its input color. A 10% tint is 10% of the input color combined with 90% white.
    val 0 means it will be 100% white.Possible values are from 0 to 100000

     

    Actually, this is not true.  Though most of the colour transforms behave as described, tint and shade do not.  The colour progression is not linear.  At least three people have tried to implement this and found that it doesn't work.  And nor could we figure out what does.  Would it be possible to have someone who knows the innards of the DrawingML implementation comment on this?  I'm sure we're not the only ones having problems.

    http://openxmldeveloper.org/forums/thread/1627.aspx

    BTW, the same shade and tint in ExcelXML and WordXML works fine.  It is just the DrawingML part that is doing something different.

    Thanks

View as RSS news feed in XML