[GRASS-dev] Programmatically obtain GRASS colour ramps in Python
Markus Neteler
neteler at osgeo.org
Mon Sep 17 11:14:47 PDT 2018
On Mon, Sep 17, 2018 at 4:17 AM Pierre Roudier <pierre.roudier at gmail.com> wrote:
>
> Hi all,
>
> I am trying to write a little Python extension wrapping r.color to use
> different kind of strecthes,
>
> It should be pretty simple, basically just builkding rules on-the-fly
> and pass them to r.color. But I can't quite seem how to retrieve the
> GRASS color ramps details to create my ruleset.
>
> Is there any portable way to actually to actually passthe name of a
> GRASS color ramp, and get the details (colours) of that colour ramp?
Maybe you can find some code here:
gui/wxpython/modules/colorrules.py
best
Markus
More information about the grass-dev
mailing list