Ejemplo n.º 1
0
        public Color getDarkMainColor(Color defaultColor)
        {
            var mainSwatch = getMainSwatch();

            float[] newHsl = copyHslValues(mainSwatch);
            newHsl[2] = TARGET_DARK_LUMA;
            var mainDarkSwatch = new Swatch(ColorUtils.HSLtoRGB(newHsl), 0);

            return(mainDarkSwatch != null?mainDarkSwatch.GetRgb() : defaultColor);
        }
Ejemplo n.º 2
0
 /**
  * Returns a muted and dark color from the palette as an RGB packed int.
  *
  * @param defaultColor value to return if the swatch isn't available
  */
 public Color getDarkMutedColor(Color defaultColor)
 {
     return(mDarkMutedSwatch != null?mDarkMutedSwatch.GetRgb() : defaultColor);
 }
Ejemplo n.º 3
0
 /**
  * Returns a muted and light color from the palette as an RGB packed int.
  *
  * @param defaultColor value to return if the swatch isn't available
  */
 public Color getLightMutedColor(Color defaultColor)
 {
     return(mLightMutedColor != null?mLightMutedColor.GetRgb() : defaultColor);
 }
Ejemplo n.º 4
0
 /**
  * Returns a dark and vibrant color from the palette as an RGB packed int.
  *
  * @param defaultColor value to return if the swatch isn't available
  */
 public Color getDarkVibrantColor(Color defaultColor)
 {
     return(mDarkVibrantSwatch != null?mDarkVibrantSwatch.GetRgb() : defaultColor);
 }
Ejemplo n.º 5
0
 /**
  * Returns a light and vibrant color from the palette as an RGB packed int.
  *
  * @param defaultColor value to return if the swatch isn't available
  */
 public Color getLightVibrantColor(Color defaultColor)
 {
     return(mLightVibrantSwatch != null?mLightVibrantSwatch.GetRgb() : defaultColor);
 }