Exemple #1
0
void GamePanel::intializeBackground() {
  last = ofGetElapsedTimeMillis();
  col.setHsb(0,255,255);
  col2.setHsb(0,255,255);
  col3.setHsb(0,255,255);
  col4.setHsb(0,255,255);
  counter = 0;
}
 void parseHsb(ofColor & color, string attribute) {
     double h = m_settings.getAttribute(attribute, "hue", 0.0);
     double s = m_settings.getAttribute(attribute, "saturation", 0.0);
     double b = m_settings.getAttribute(attribute, "brightness", 0.0);
     double a = m_settings.getAttribute(attribute, "alpha", 1.0);
     color.setHsb(h * 255.f, s * 255.f, b * 255.f, a * 255.f);
 }
Exemple #3
0
//--------------------------------------------------------------
ofColor ColorUtil::getNoiseAround( ofColor c, float radius, float seedValue )
{
	float hue, saturation, brightness;
	
	c.getHsb(hue, saturation, brightness);

	float noise = (ofNoise(seedValue) * (radius * 2)) - radius;
	hue = hue + noise;
	if (hue < 0) 
		hue = 255.0f + hue;
	if (hue > 255.0) 
		hue = hue - 255.0f;
	
	c.setHsb(hue, saturation, brightness);

	return (c);
}
Exemple #4
0
//--------------------------------------------------------------
ofColor ColorUtil::getNoiseAroundMax( ofColor c, float radius )
{

	float hue, saturation, brightness;
	
	c.getHsb(hue, saturation, brightness);

	hue = hue + radius;
	if (hue < 0) 
		hue = 255.0f + hue;
	if (hue > 255.0) 
		hue = hue - 255.0f;
	
	c.setHsb(hue, saturation, brightness);

	return (c);

}