コード例 #1
0
ファイル: Palette.cs プロジェクト: saki-saki/Palette
        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);
        }
コード例 #2
0
ファイル: Palette.cs プロジェクト: saki-saki/Palette
 /**
  * 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);
 }
コード例 #3
0
ファイル: Palette.cs プロジェクト: saki-saki/Palette
 /**
  * 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);
 }
コード例 #4
0
ファイル: Palette.cs プロジェクト: saki-saki/Palette
 /**
  * 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);
 }
コード例 #5
0
ファイル: Palette.cs プロジェクト: saki-saki/Palette
 /**
  * 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);
 }