use of org.jwildfire.transform.HSLTransformer.HSLPixel in project JWildfire by thargor6.
the class MonochromeRandomGradientGenerator method generateKeyFrames.
@Override
public List<RGBColor> generateKeyFrames(int pKeyFrameCount) {
HSLPixel hslPixel = new HSLPixel();
Pixel rgbPixel = new Pixel();
List<RGBColor> keyFrames = new ArrayList<RGBColor>();
hslPixel.saturation = Math.random() * 0.3 + 0.6999;
hslPixel.hue = Math.random() * Math.random();
for (int i = 0; i < pKeyFrameCount; i++) {
hslPixel.luminosity = Math.random() * 0.99;
HSLTransformer.hsl2rgb(hslPixel, rgbPixel);
RGBColor col = new RGBColor(rgbPixel.r, rgbPixel.g, rgbPixel.b);
keyFrames.add(col);
}
return keyFrames;
}
use of org.jwildfire.transform.HSLTransformer.HSLPixel in project JWildfire by thargor6.
the class StripesRandomGradientGenerator method createStripeColor.
private RGBColor createStripeColor() {
HSLPixel hslPixel = new HSLPixel();
hslPixel.saturation = Math.random() * 0.1 + 0.8999;
double rnd = Math.random() + Math.random() + Math.random() + Math.random() + Math.random();
if (rnd > 4.0)
hslPixel.hue = 0.8 + (rnd - 4.0) / 7.0;
else if (rnd > 3.0)
hslPixel.hue = 0.2 + (rnd - 3.0) / 7.0;
else if (rnd > 2.0)
hslPixel.hue = 0.0 + (rnd - 2.0) / 7.0;
else if (rnd > 1.0)
hslPixel.hue = 0.6 + (rnd - 1.0) / 7.0;
else
hslPixel.hue = 0.4 + rnd / 7.0;
hslPixel.luminosity = Math.random() * 0.1 + 0.8999;
Pixel rgbPixel = new Pixel();
HSLTransformer.hsl2rgb(hslPixel, rgbPixel);
return new RGBColor(rgbPixel.r, rgbPixel.g, rgbPixel.b);
}
use of org.jwildfire.transform.HSLTransformer.HSLPixel in project JWildfire by thargor6.
the class StrongHueRandomGradientGenerator method generateKeyFrames.
@Override
public List<RGBColor> generateKeyFrames(int pKeyFrameCount) {
HSLPixel hslPixel = new HSLPixel();
Pixel rgbPixel = new Pixel();
List<RGBColor> keyFrames = new ArrayList<RGBColor>();
hslPixel.saturation = Math.random() * 0.1 + 0.8999;
for (int i = 0; i < pKeyFrameCount; i++) {
hslPixel.luminosity = Math.random() * 0.90;
double rnd = Math.random() + Math.random() + Math.random() + Math.random() + Math.random();
if (rnd > 4.0)
hslPixel.hue = 0.8 + (rnd - 4.0) / 7.0;
else if (rnd > 3.0)
hslPixel.hue = 0.2 + (rnd - 3.0) / 7.0;
else if (rnd > 2.0)
hslPixel.hue = 0.0 + (rnd - 2.0) / 7.0;
else if (rnd > 1.0)
hslPixel.hue = 0.6 + (rnd - 1.0) / 7.0;
else
hslPixel.hue = 0.4 + rnd / 7.0;
HSLTransformer.hsl2rgb(hslPixel, rgbPixel);
RGBColor col = new RGBColor(rgbPixel.r, rgbPixel.g, rgbPixel.b);
keyFrames.add(col);
}
return keyFrames;
}