COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Making discrete color table into a continuous one

• Follow

```I have the color table blues :(

Does anyone have any tips on how to make a discrete set of 25 colors
into a continuous 255 element color table?  The discrete colors are:

rgb = [[153,153,153], \$
[212,170,255], \$
[178,102,255], \$
[127,  0,255], \$
[102,140,255], \$
[  0, 63,255], \$
[  0,127,127], \$
[102,197,255], \$
[102,255,197], \$
[  0,255,159], \$
[ 31,255,  0], \$
[ 63,127,  0], \$
[178,255,102], \$
[212,255,170], \$
[223,255,  0], \$
[255,216,102], \$
[255,143, 76], \$
[191,  0,  0], \$
[255,  0, 95], \$
[255,102,159], \$
[116, 38,127], \$
[127,  0,  0], \$
[127, 76, 51], \$
[127, 47,  0], \$
[ 76, 61, 61]]

I'd like them to transition 'smoothly' from one to the next but I'm
not sure what the best way to do this is.

Thanks.
Dave
```
 0

```Dave writes:

> Does anyone have any tips on how to make a discrete set of 25 colors
> into a continuous 255 element color table?

CONGRID, with the INTERP keyword set. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
```
 0
Reply news2122 (4023) 2/9/2010 2:08:27 PM

```> =A0CONGRID, with the INTERP keyword set. :-)

Perfect!  Thanks.
```
 0

```On Feb 9, 8:08=A0am, David Fanning <n...@dfanning.com> wrote:
> =A0CONGRID, with the INTERP keyword set. :-)

Nice!
```
 0
Reply gianguido.cianci (137) 2/9/2010 5:22:01 PM

3 Replies
57 Views

5/20/2013 12:08:13 PM