Package toxi.color

Examples of toxi.color.TColor.brightness()


     * toxi.color.ColorTheoryStrategy#createListFromcolor(toxi.color.TColor)
     */
    public ColorList createListFromColor(ReadonlyTColor src) {
        ColorList colors = new ColorList(src);
        TColor c = src.getRotatedRYB(theta);
        if (c.brightness() < 0.5) {
            c.lighten(0.2f);
        } else {
            c.darken(0.2f);
        }
        colors.add(c);
View Full Code Here


            c.darken(0.2f);
        }
        colors.add(c);

        c = src.getRotatedRYB(theta * 2);
        if (c.brightness() < 0.5) {
            c.lighten(0.1f);
        } else {
            c.darken(0.1f);
        }
        colors.add(c);
View Full Code Here

    public ColorList createListFromColor(ReadonlyTColor src) {
        ColorList colors = new ColorList(src);
        int direction = isFlipped ? -1 : 1;

        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));
View Full Code Here

        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));
        c.setBrightness(MathUtils.max(0.2f, c.brightness()));
View Full Code Here

        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));
        c.setBrightness(wrap(c.brightness(), 0.3f, 0.6f, 0.3f));
View Full Code Here

        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));
        c.setBrightness(wrap(c.brightness(), 0.4f, 0.2f, 0.4f));
View Full Code Here

        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

     */
    public ColorList createListFromColor(ReadonlyTColor src) {
        ColorList colors = new ColorList(src);
        // # A contrasting color: much darker or lighter than the original.
        TColor c = src.copy();
        if (c.brightness() > 0.4) {
            c.setBrightness(0.1f + c.brightness() * 0.25f);
        } else {
            c.setBrightness(1.0f - c.brightness() * 0.25f);
        }
        colors.add(c);
View Full Code Here

    public ColorList createListFromColor(ReadonlyTColor src) {
        ColorList colors = new ColorList(src);
        // # A contrasting color: much darker or lighter than the original.
        TColor c = src.copy();
        if (c.brightness() > 0.4) {
            c.setBrightness(0.1f + c.brightness() * 0.25f);
        } else {
            c.setBrightness(1.0f - c.brightness() * 0.25f);
        }
        colors.add(c);

View Full Code Here

        // # A contrasting color: much darker or lighter than the original.
        TColor c = src.copy();
        if (c.brightness() > 0.4) {
            c.setBrightness(0.1f + c.brightness() * 0.25f);
        } else {
            c.setBrightness(1.0f - c.brightness() * 0.25f);
        }
        colors.add(c);

        // A soft supporting color: lighter and less saturated.
        c = src.copy();
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.