This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* If mode is HSB, this will take the shortest path around the | |
* color wheel to find the new color. For instance, red to blue | |
* will go red violet blue (backwards in hue space) rather than | |
* cycling through ROYGBIV. | |
*/ | |
// Disabling rollover (wasn't working anyway) for 0126. | |
// Otherwise it makes full spectrum scale impossible for | |
// those who might want it…in spite of how despicable | |
// a full spectrum scale might be. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float smootherStep(float origin, float dest, float step) { | |
return map(step * step * step * (step * (step * 6 - 15) + 10), | |
0, 1, origin, dest); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color smootherStepColor(color c1, color c2, float step) { | |
// Constrain step. | |
step = step < 0 ? 0 : step > 1 ? 1 : step; | |
// Define a default color. | |
color result = 0x00000000; | |
if (g.colorMode == RGB) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (eval == EvalMethod.SmootherStep) { | |
return smootherStepColor(current.clr, prev.clr, fraction); | |
} else { | |
return lerpColor(current.clr, prev.clr, fraction); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = 6; | |
float swatchW; | |
float fWidth; | |
float h1; | |
float h2; | |
float step; | |
String clrMdLabel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int paletteCount = 6; | |
int rows = 6; | |
int cols = 6; | |
float tileH; | |
float tileW; | |
float swatchW = 64; | |
float consistency = 0.75; | |
float step; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void blendRadGrad(PImage pg, Gradient gradient, float blend, | |
int cx, int cy, float sclr) { | |
color clr; | |
int run; | |
int rise; | |
int dist; | |
int w = pg.width; | |
int h = pg.height; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float project(float originx, float originy, | |
float destx, float desty, | |
int pointx, int pointy) { | |
// Rise and run of line. | |
float lnRise = desty - originy; | |
float lnRun = destx - originx; | |
// Distance-squared of line. | |
float lnDistSq = lnRun * lnRun + lnRise * lnRise; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void blendLinGrad(PImage pg, Gradient gradient, float blend, | |
int orx, int ory, int dex, int dey) { | |
color clr; | |
int w = pg.width; | |
int h = pg.height; | |
pg.loadPixels(); | |
for (int y = 0, x, i = 0; y < h; ++y) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<svg version="1.1" id="Fan" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve" transform="translate(-256, -256)"> | |
<path id="st0" class="st0" fill="#ff8080" d="M420.8,283.4c-14.2,8.3-29.2,15.8-44.9,22.3c-46.8,19.4-100.5-2.8-119.9-49.7 | |
c0,50.7,41.1,91.8,91.8,91.8c58.6,0,113.9-13.7,163.1-38.1C479.6,308.8,448.5,300.1,420.8,283.4z"/> | |
</svg> |