W3C home > Mailing lists > Public > www-style@w3.org > September 2012

Re: [css4-images] Color stop syntax

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Mon, 24 Sep 2012 17:43:46 +0200
Message-ID: <F8559E11E8F74D0BAC2AD26C4095BEA9@FREMYD2>
To: "CSS WG" <www-style@w3.org>
[forward of Rik's answer to one of my question]
|  |  For people who don't know what the 'midpoint' is, it defines
|  |  the points between 2 gradient stops where the color is the
|  |  average of the 2 colors.
|  
|  How is that different from dividing your gradient color interval 
|  in two? A smooth interpolation function?

The colors are interpolated with the following formula: 

C0 + x^n * (C1-C0)

with :

    C0 the first stop
    C1 the second stop
    x going from 0 to 1
    n controlling the midpoint

With current gradients, n is always 1.

Maybe you should send your question to the group as well

Rik
Received on Monday, 24 September 2012 15:44:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:00 GMT