use of org.asqatasun.contrastFinder.result.ColorCombinaison in project Contrast-Finder by Asqatasun.
the class ColorFinderHsvTest method testFindColorsBornWhite2.
public void testFindColorsBornWhite2() {
System.out.println("FindColorsBornWhite2");
Color foregroundColor = new Color(254, 254, 254);
Color backgroundColor = new Color(255, 255, 255);
Float coefficientLevel = 4.5f;
ColorFinderHsv instance = new ColorFinderHsv();
List<ColorCombinaison> colorCombinaison = new ArrayList<ColorCombinaison>();
instance.findColors(foregroundColor, backgroundColor, false, coefficientLevel);
for (ColorCombinaison combinaisons : instance.getColorResult().getSuggestedColors()) {
LOGGER.debug("HashCode :" + colorCombinaison.hashCode() + " COLOR : " + combinaisons.getContrast());
colorCombinaison.add(combinaisons);
}
int sizeList = colorCombinaison.size();
Color firstColor = new Color(104, 104, 104);
assertEquals(firstColor, colorCombinaison.get(0).getColor());
Color mediumColor = new Color(154, 93, 93);
assertEquals(mediumColor, colorCombinaison.get(4).getColor());
Color endColor = new Color(229, 4, 4);
assertEquals(endColor, colorCombinaison.get(sizeList - 1).getColor());
}
use of org.asqatasun.contrastFinder.result.ColorCombinaison in project Contrast-Finder by Asqatasun.
the class ColorFinderHsvTest method testFindColorsBornBlack2.
public void testFindColorsBornBlack2() {
System.out.println("FindColorsBornBlack2");
Color foregroundColor = new Color(1, 1, 1);
Color backgroundColor = new Color(3, 3, 3);
Float coefficientLevel = 4.5f;
ColorFinderHsv instance = new ColorFinderHsv();
List<ColorCombinaison> colorCombinaison = new ArrayList<ColorCombinaison>();
instance.findColors(foregroundColor, backgroundColor, false, coefficientLevel);
for (ColorCombinaison combinaisons : instance.getColorResult().getSuggestedColors()) {
LOGGER.debug("HashCode :" + colorCombinaison.hashCode() + " COLOR : " + combinaisons.getContrast());
colorCombinaison.add(combinaisons);
}
Color firstColor = new Color(131, 131, 131);
assertEquals(firstColor, colorCombinaison.get(0).getColor());
}
use of org.asqatasun.contrastFinder.result.ColorCombinaison in project Contrast-Finder by Asqatasun.
the class ColorFinderHsvTest method testFindColorsBornBlack.
public void testFindColorsBornBlack() {
System.out.println("FindColorsBornBlack");
Color foregroundColor = new Color(1, 1, 1);
Color backgroundColor = new Color(3, 3, 3);
Float coefficientLevel = 4.5f;
ColorFinderHsv instance = new ColorFinderHsv();
List<ColorCombinaison> colorCombinaison = new ArrayList<ColorCombinaison>();
instance.findColors(foregroundColor, backgroundColor, true, coefficientLevel);
for (ColorCombinaison combinaisons : instance.getColorResult().getSuggestedColors()) {
LOGGER.debug("HashCode :" + colorCombinaison.hashCode() + " COLOR : " + combinaisons.getContrast());
colorCombinaison.add(combinaisons);
}
Color firstColor = new Color(133, 133, 133);
assertEquals(firstColor, colorCombinaison.get(0).getColor());
}
use of org.asqatasun.contrastFinder.result.ColorCombinaison in project Contrast-Finder by Asqatasun.
the class ColorFinderHsvTest method testFindColorsBornBlack2.
@Test
public void testFindColorsBornBlack2() {
System.out.println("FindColorsBornBlack2");
Color foregroundColor = new Color(1, 1, 1);
Color backgroundColor = new Color(3, 3, 3);
Float coefficientLevel = 4.5f;
ColorFinderHsv instance = new ColorFinderHsv();
List<ColorCombinaison> colorCombinaison = new ArrayList<ColorCombinaison>();
instance.findColors(foregroundColor, backgroundColor, false, coefficientLevel);
for (ColorCombinaison combinaisons : instance.getColorResult().getSuggestedColors()) {
LOGGER.debug("HashCode :" + colorCombinaison.hashCode() + " COLOR : " + combinaisons.getContrast());
colorCombinaison.add(combinaisons);
}
Color firstColor = new Color(131, 131, 131);
assertEquals(firstColor, colorCombinaison.get(0).getColor());
}
use of org.asqatasun.contrastFinder.result.ColorCombinaison in project Contrast-Finder by Asqatasun.
the class ColorFinderHsvTest method testFindColorsBornWhite.
@Test
public void testFindColorsBornWhite() {
System.out.println("FindColorsBornWhite");
Color foregroundColor = new Color(254, 254, 254);
Color backgroundColor = new Color(255, 255, 255);
Float coefficientLevel = 4.5f;
ColorFinderHsv instance = new ColorFinderHsv();
List<ColorCombinaison> colorCombinaison = new ArrayList<ColorCombinaison>();
instance.findColors(foregroundColor, backgroundColor, true, coefficientLevel);
for (ColorCombinaison combinaisons : instance.getColorResult().getSuggestedColors()) {
LOGGER.debug("HashCode :" + colorCombinaison.hashCode() + " COLOR : " + combinaisons.getContrast());
colorCombinaison.add(combinaisons);
}
int sizeList = colorCombinaison.size();
Color firstColor = new Color(105, 105, 105);
assertEquals(firstColor, colorCombinaison.get(0).getColor());
Color mediumColor = new Color(155, 94, 94);
assertEquals(mediumColor, colorCombinaison.get(4).getColor());
Color endColor = new Color(230, 1, 1);
assertEquals(endColor, colorCombinaison.get(sizeList - 1).getColor());
}
Aggregations