Group Abstract Group Abstract

Message Boards Message Boards

Make color gradients with a GUI

Posted 10 years ago
Attachments:
POSTED BY: Kevin Daily
8 Replies

Hi Kevin,

Why don't you find a better home for this package (such as GitHub) and then add a link to http://packagedata.net/ ? Such small packages are very welcome there (even when they are still under development and you may not yet be comfortable adding them tot he Wolfram Library Archive).

POSTED BY: Szabolcs Horvát

Done.

POSTED BY: Kevin Daily
Posted 8 years ago
POSTED BY: J. M.
POSTED BY: Kevin Daily

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD
POSTED BY: Pedro Fonseca

Kevin, this is very nice! But can you update your post with some usage-case examples? I mean how do you use colorBlender output inside other code? Or does it have a different purpose?

POSTED BY: Sam Carrettie

For example, you can use output from the colorBlender with the Blend function to create color functions, such as

Blend[{{0,Red},{1,Blue}},x]

which would output a color blend that depends on the value of 'x'. With this format, you can create color maps like you would with ColorData functions, such as

Plot3D[Exp[-x^2 - y^2], {x, -2, 2}, {y, -2, 2}, ColorFunction -> (ColorData["TemperatureMap"][#3] &)]

could become instead

Plot3D[Exp[-x^2 - y^2], {x, -2, 2}, {y, -2, 2}, ColorFunction -> (Blend[{{0, Red}, {1, Blue}}, #3] &)]

Example of using a color blend in Plot3D.

POSTED BY: Kevin Daily
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard