Examples of saturation()


Examples of org.jrebirth.af.core.resource.color.HSBColor.saturation()

    private void checkHsbColor(final ColorItem colorItem) {
        final Color color = colorItem.get();
        final HSBColor wc = (HSBColor) ResourceBuilders.COLOR_BUILDER.getParam(colorItem);

        assertEquals(color.getHue(), wc.hue(), 1.0);
        assertEquals(color.getSaturation(), wc.saturation(), 0.000001);
        assertEquals(color.getBrightness(), wc.brightness(), 0.000001);

        assertEquals(color.getOpacity(), wc.opacity(), 0.1);
    }
View Full Code Here

Examples of toxi.color.TColor.saturation()

        TColor c = src.getRotatedRYB(30 * direction);
        c.setBrightness(wrap(c.brightness(), 0.25f, 0.6f, 0.25f));
        colors.add(c);

        c = src.getRotatedRYB(30 * direction);
        c.setSaturation(wrap(c.saturation(), 0.4f, 0.1f, 0.4f));
        c.setBrightness(wrap(c.brightness(), 0.4f, 0.2f, 0.4f));
        colors.add(c);

        c = src.getRotatedRYB(160 * direction);
        c.setSaturation(wrap(c.saturation(), 0.25f, 0.1f, 0.25f));
View Full Code Here

Examples of toxi.color.TColor.saturation()

        c.setSaturation(wrap(c.saturation(), 0.4f, 0.1f, 0.4f));
        c.setBrightness(wrap(c.brightness(), 0.4f, 0.2f, 0.4f));
        colors.add(c);

        c = src.getRotatedRYB(160 * direction);
        c.setSaturation(wrap(c.saturation(), 0.25f, 0.1f, 0.25f));
        c.setBrightness(MathUtils.max(0.2f, c.brightness()));
        colors.add(c);

        c = src.getRotatedRYB(150 * direction);
        c.setSaturation(wrap(c.saturation(), 0.1f, 0.8f, 0.1f));
View Full Code Here

Examples of toxi.color.TColor.saturation()

        c.setSaturation(wrap(c.saturation(), 0.25f, 0.1f, 0.25f));
        c.setBrightness(MathUtils.max(0.2f, c.brightness()));
        colors.add(c);

        c = src.getRotatedRYB(150 * direction);
        c.setSaturation(wrap(c.saturation(), 0.1f, 0.8f, 0.1f));
        c.setBrightness(wrap(c.brightness(), 0.3f, 0.6f, 0.3f));
        colors.add(c);

        c = src.getRotatedRYB(150 * direction);
        c.setSaturation(wrap(c.saturation(), 0.1f, 0.8f, 0.1f));
View Full Code Here

Examples of toxi.color.TColor.saturation()

        c.setSaturation(wrap(c.saturation(), 0.1f, 0.8f, 0.1f));
        c.setBrightness(wrap(c.brightness(), 0.3f, 0.6f, 0.3f));
        colors.add(c);

        c = src.getRotatedRYB(150 * direction);
        c.setSaturation(wrap(c.saturation(), 0.1f, 0.8f, 0.1f));
        c.setBrightness(wrap(c.brightness(), 0.4f, 0.2f, 0.4f));
        // colors.add(c);

        return colors;
    }
View Full Code Here

Examples of toxi.color.TColor.saturation()

        colors.add(c);

        // A soft supporting color: lighter and less saturated.
        c = src.copy();
        c.lighten(0.3f);
        c.setSaturation(0.1f + c.saturation() * 0.3f);
        colors.add(c);

        // A contrasting complement: very dark or very light.
        c = src.getComplement();
        if (c.brightness() > 0.3) {
View Full Code Here

Examples of toxi.color.TColor.saturation()

        // The complement and a light supporting variant.
        colors.add(src.getComplement());

        c = src.getComplement();
        c.lighten(0.3f);
        c.setSaturation(0.1f + c.saturation() * 0.25f);
        colors.add(c);
        return colors;
    }

    /*
 
View Full Code Here

Examples of toxi.color.TColor.saturation()

     */
    public ColorList createListFromColor(ReadonlyTColor src) {
        ColorList colors = new ColorList(src);
        TColor c = src.copy();
        c.setBrightness(wrap(c.brightness(), 0.5f, 0.2f, 0.3f));
        c.setSaturation(wrap(c.saturation(), 0.3f, 0.1f, 0.3f));
        colors.add(c);

        c = src.copy();
        c.setBrightness(wrap(c.brightness(), 0.2f, 0.2f, 0.6f));
        colors.add(c);
View Full Code Here

Examples of toxi.color.TColor.saturation()

        colors.add(c);

        c = src.copy();
        c.setBrightness(MathUtils.max(0.2f,
                c.brightness() + (1 - c.brightness()) * 0.2f));
        c.setSaturation(wrap(c.saturation(), 0.3f, 0.1f, 0.3f));
        colors.add(c);

        c = src.copy();
        c.setBrightness(wrap(c.brightness(), 0.5f, 0.2f, 0.3f));
        colors.add(c);
View Full Code Here

Examples of toxi.color.TColor.saturation()

        TColor d = c.copy();
        assertEquals(c.red(), d.red());
        assertEquals(c.green(), d.green());
        assertEquals(c.blue(), d.blue());
        assertEquals(c.hue(), d.hue());
        assertEquals(c.saturation(), d.saturation());
        assertEquals(c.brightness(), d.brightness());
        assertEquals(c.cyan(), d.cyan());
        assertEquals(c.magenta(), d.magenta());
        assertEquals(c.yellow(), d.yellow());
        assertEquals(c.black(), d.black());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.