com.flask.colorpicker.Utils Java Examples

The following examples show how to use com.flask.colorpicker.Utils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AlphaSlider.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.getAlphaPercent(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #2
Source File: LightnessSlider.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.lightnessOfColor(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #3
Source File: AlphaSlider.java    From timecat with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.getAlphaPercent(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #4
Source File: LightnessSlider.java    From timecat with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.lightnessOfColor(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #5
Source File: AlphaSlider.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.getAlphaPercent(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #6
Source File: LightnessSlider.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.lightnessOfColor(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #7
Source File: AlphaSlider.java    From openlauncher with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.getAlphaPercent(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #8
Source File: LightnessSlider.java    From openlauncher with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
	this.color = color;
	this.value = Utils.lightnessOfColor(color);
	if (bar != null) {
		updateBar();
		invalidate();
	}
}
 
Example #9
Source File: AlphaSlider.java    From droidddle with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
    this.color = color;
    this.value = Utils.getAlphaPercent(color);
    if (bar != null) {
        updateBar();
        invalidate();
    }
}
 
Example #10
Source File: LightnessSlider.java    From droidddle with Apache License 2.0 5 votes vote down vote up
public void setColor(int color) {
    this.color = color;
    this.value = Utils.lightnessOfColor(color);
    if (bar != null) {
        updateBar();
        invalidate();
    }
}
 
Example #11
Source File: LightnessSlider.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
@Override
protected void drawHandle(Canvas canvas, float x, float y) {
	solid.setColor(Utils.colorAtLightness(color, value));
	canvas.drawCircle(x, y, handleRadius, clearingStroke);
	canvas.drawCircle(x, y, handleRadius * 0.75f, solid);
}
 
Example #12
Source File: LightnessSlider.java    From timecat with Apache License 2.0 4 votes vote down vote up
@Override
protected void drawHandle(Canvas canvas, float x, float y) {
	solid.setColor(Utils.colorAtLightness(color, value));
	canvas.drawCircle(x, y, handleRadius, clearingStroke);
	canvas.drawCircle(x, y, handleRadius * 0.75f, solid);
}
 
Example #13
Source File: LightnessSlider.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void drawHandle(Canvas canvas, float x, float y) {
	solid.setColor(Utils.colorAtLightness(color, value));
	canvas.drawCircle(x, y, handleRadius, clearingStroke);
	canvas.drawCircle(x, y, handleRadius * 0.75f, solid);
}
 
Example #14
Source File: LightnessSlider.java    From openlauncher with Apache License 2.0 4 votes vote down vote up
@Override
protected void drawHandle(Canvas canvas, float x, float y) {
	solid.setColor(Utils.colorAtLightness(color, value));
	if (showBorder) canvas.drawCircle(x, y, handleRadius, clearingStroke);
	canvas.drawCircle(x, y, handleRadius * 0.75f, solid);
}
 
Example #15
Source File: LightnessSlider.java    From droidddle with Apache License 2.0 4 votes vote down vote up
@Override
protected void drawHandle(Canvas canvas, float x, float y) {
    solid.setColor(Utils.colorAtLightness(color, value));
    canvas.drawCircle(x, y, handleRadius, clearingStroke);
    canvas.drawCircle(x, y, handleRadius * 0.75f, solid);
}