Back to project page unknown-pleasures.
The source code is released under:
Creative Commons Attribution NonCommercial NoDerivs (CC-NC-ND) THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTE...
If you think the Android project unknown-pleasures listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * BluePalette.java// w ww . j av a2 s . c o m * Author: marek.brodziak@gmail.com * Created: May 21, 2014 * Copyright 2014 by miniti */ package pl.miniti.android.pleasures.palette; import android.graphics.Color; /** * Retro blue on white background */ public class BluePalette extends DimSupport { /** * Palette colors */ private static final int[] palette = new int[]{Color.rgb(192, 120, 48), Color.rgb(240, 168, 120), Color.rgb(144, 192, 216), Color.rgb(72, 144, 168), Color.rgb(24, 96, 120)}; /* * (non-Javadoc) * * @see pl.miniti.android.pleasures.palette.Palette#background() */ @Override public int background() { return Color.WHITE; } /* * (non-Javadoc) * * @see pl.miniti.android.pleasures.palette.DimSupport#rgb(int, int) */ @Override protected int rgb(int line, int of) { return palette[(int) ((1f * line / of) * palette.length)]; } /* * (non-Javadoc) * * @see pl.miniti.android.pleasures.palette.Palette#frame() */ @Override public void frame() { // do nothing } }