[Qgis-developer] color ramps for vector graduated symbols (ticket #782)

Tim Sutton tim at linfiniti.com
Thu Nov 1 05:15:33 EDT 2007


Hi Barry

Yeah thats exactly the kind of thing I had in mind. I tried it out and
it works great except the pallette chooser below was broken for me
(see screenie) - I just get a big black block there.

So maybe we should just port this to C++ and stick it in qgis_gui lib?

Regards

Tim

2007/11/1, Barry Rowlingson <b.rowlingson at lancaster.ac.uk>:
> Marco Hugentobler wrote:
>
> >>The MatLab colour map editor is show here (scroll down a little for a
> >>screenie):
> >>
> >>http://tinyurl.com/27gbra
> >
> >
> > That looks great!
>
>   I wrote a colour ramp editor in Python for Qt, based on some C++
> source I think I found in the Qt examples. It returns a
> QtGui.QLinearGradient object. You get the little triangles for dragging
> around the map, you can double click to add new colours and so on.
>
>   Go here and get rampEditor.zip, then run "python RampEditor.py" - its
> only two files and extracts to the current directory:
>
> http://www.maths.lancs.ac.uk/~rowlings/Geog/Qgis/
>
>   (obviously you need PyQt4 module for your python).
>
>   I wrote it as a widget that can be inserted into dialogs. When you run
> the example you'll see my gradient widget and a "colour square" widget
> below. This is for testing drag-n-drop. Right-click on the colour square
> (I should add a double-click option) to choose a colour, then drag and
> drop this onto the gradient bar.
>
>   Gradient bar triangles can be dragged and double-clicked. I'm sure
> they can be deleted... Somehow... Oh, maybe that needs adding. I think
> there may be some off-by-one errors in the triangle placement too.. This
> is work in progress....
>
>   The grooviest ramp editor I've seen is in Adobe Illustrator, where you
> basically draw a spline that interpolates between your colours in
> whatever colour space you are interested in. Hence you can easily create
> colour ramps in hue and saturation as well as linear RGB values.
>
>   Also, it may also be worth looking into the ColorBrewer palettes for
> presets for classifications:
>
> http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_intro.html
>
> Barry
>
>


-- 
Tim Sutton
QGIS Project Steering Committee Member - Release  Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colourRamp.jpg
Type: image/jpeg
Size: 15321 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20071101/9801ee83/colourRamp.jpg


More information about the Qgis-developer mailing list