Hi Chris On Sat, Apr 13, 2013 at 8:57 AM, Chris Crook <[email protected]> wrote: > Hi > > I really like the rule based renderer. One thing that doesn't seem easy > though is to use the "colour" data defined property, as it isn't clear (and > possibly not easy) to generate an expression for a colour. > > I am thinking it would be really useful to have a "Colour" section in the > function list, with at least two functions - rgb(x,y,z), and ramp(name,value) > (value from 0 to 1, or 0 to 100?). Possibly one more - rgba(x,y,z,a). Then > it would be very easy to build colours from data. > > I'm guessing this would be easy to do - any takers? or pointers to where to > implement it?
The implementation should be quite straightforward - you can have a look at QgsExpression class and the built-in functions it provides. Creating a function that takes three integers and composes a string from them should be really just few lines of code. Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
