Colour shortcuts in QGIS 2.4

Quick poll… what’s the most frustrating thing about GIS? Fighting with colour plotters? Trying to remember GDAL command line syntax? MapInfo’s new ribbon interface* [1]? All of the above?

Wrong!

It’s getting a colour from here:

colour1

…all the way over to here:

colour2

Since the dawn of GIS humanity has struggled with this simple task* [2]. We’ve come up with multiple techniques for solving this problem, ranging from the RSI inducing “select and copy red value, alt-tab, paste, alt-tab, select and copy green value, alt-tab, paste, etc….” method, through to chanting “70, 145, 160… 70, 145, 160… 70, 145, 150… 70, 145, 150” to ourselves as we frantically try and rearrange dialogs to find the destination colour picker, all the while avoiding strange looks from co-workers.

Fortunately, QGIS 2.4 is coming to the rescue! Now, you can right click on any of QGIS’ colour picker buttons for a handy copy/paste colour shortcut menu. Pasting colours works from a whole range of formats, including hex codes, color names, and css-style “rgb” and “rgba” strings.

Fixed!

Problem solved!

Even better, you can just drag colours from one colour button to another:

Fixed again...

… and solved again…

Or, drag a colour from GIMP and drop it onto a QGIS colour button:

x

… and yet again!

Or even drag a colour from a QGIS button directly onto a shape in Inkscape! All this win is coming your way in QGIS 2.4, due June 2014.

[1] Pre-empting the inevitable flood of complaints when this new interface is rolled out
[2] I assume

Tagged , , , , , , , ,

10 thoughts on “Colour shortcuts in QGIS 2.4

  1. Batesy says:

    WOAH! That’s very nice!

    Do you reckon you could build in a colour picker / eyedropper to the “Select Color” window so we can pick colours from outside of QGIS, something like Pixie (http://www.nattyware.com/pixie.php) or ColorPic (http://www.iconico.com/ColorPic/)? That’d be awesome when trying to match colours in a map from a pdf or website, etc. I guess you could have Gimp open and drag the colour tile but a built-in picker would be sweet as!

    • Nyall Dawson says:

      It’s on my to do list- I also find that a really useful feature in GIMP, and I think it would be great for sampling colors from a raster layer.

  2. régis says:

    Hi Nyall,
    fantastic feature!
    I couldn’t have drag&drop work in revision a94483e as you mention. Copy on right click works.
    Is it merged yet?
    Régis

  3. Antonio Locandro says:

    Just add a colour picker for both fill and border and we can be in color nirvana

  4. Ross says:

    Ha ha! Love the bit about chanting RGB values…I find myself doing it all the time. Looking forward to all these new features

  5. Morgan says:

    Another chanter here.
    Love the dragging features, a toggle button ala the old Photoshop would also allow quick fill/border colour changing.

  6. Chris says:

    That is awesome. Great article Nyall and a great user friendly feature. That is bound to speed up repetive Mapping tasks.

  7. […] with colours is a huge part of cartography. In QGIS 2.4 I made a few changes to improve interaction with colours. These included the ability to copy and paste colours by right clicking on a colour button, and […]

  8. Charlie says:

    Lol, “chanting “70, 145, 160…” is my personal favorite.

Leave a Reply

Your email address will not be published. Required fields are marked *