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.
/** * Retro1Palette.java// w ww.ja va2 s. com * Author: marek.brodziak@gmail.com * Created: May 6, 2014 * Copyright 2014 by miniti */ package pl.miniti.android.pleasures.palette; import android.graphics.Color; /** * Retro colors on a black background */ public class Retro1Palette extends DimSupport { /** * Palette colors */ private static final int[] palette = new int[]{Color.rgb(65, 125, 128), Color.rgb(88, 130, 120), Color.rgb(130, 153, 131), Color.rgb(141, 163, 111), Color.rgb(129, 150, 80)}; /* * (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#background() */ @Override public int background() { return Color.BLACK; } /* * (non-Javadoc) * * @see pl.miniti.android.pleasures.palette.Palette#frame() */ @Override public void frame() { // do nothing } }