New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added matplolib color ramps: inferno, magma, plasma and viridis #2053

Merged
merged 2 commits into from Mar 13, 2017

Conversation

Projects
None yet
1 participant
@lossyrob
Member

lossyrob commented Mar 13, 2017

Fixes #1941

Also adds links to Carto Colors, so fixes #1944

Here are some example images from a Philadelphia elevation tile:

Magma

magma

Inferno

inferno

Plasma

plasma

Viridis

viridis

In case it proves useful later, I moved from the matplotlib 0.0-1.0 space and translated to the Scala source via:

def translate_colors(c):
    hexes = []
    for x in c:
        hexes.append(rgb2hex(x))
    scalad = list(map(lambda x: '0x' + (x.replace('#', '') + 'FF').upper(), hexes))
    N = 4
    grouped = [', '.join(scalad[n:n+N]) for n in range(0, len(scalad), N)]
    for group in grouped:
        print(group + ',')

@lossyrob lossyrob added the needs-cq label Mar 13, 2017

@lossyrob lossyrob added this to the 1.1 milestone Mar 13, 2017

@lossyrob lossyrob merged commit da20b06 into locationtech:master Mar 13, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@lossyrob lossyrob removed the in progress label Mar 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment