Slrtce/app/src/main/java/com/sssa/slrtce/misc/utils/Helper.java
/**
     * store pallete color in int array
     * @param context
     * @param palette
     * @return
     */
store pallete color in int array
@param context
@param palette
@return
store pallete color in int array @param context @param palette @return
public static int[] paletteColor (Context context, Palette palette){
        int color[] = new int[3];
        if (palette.getDarkVibrantSwatch() != null){
            color[0] = palette.getDarkVibrantSwatch().getTitleTextColor();
            color[1] = palette.getDarkVibrantSwatch().getBodyTextColor();
            color[2] = palette.getDarkVibrantSwatch().getRgb();
        }else if (palette.getDarkMutedSwatch() != null){
            color[0] = palette.getDarkMutedSwatch().getTitleTextColor();
            color[1] = palette.getDarkMutedSwatch().getBodyTextColor();
            color[2] = palette.getDarkMutedSwatch().getRgb();
        }else if (palette.getVibrantSwatch() != null){
            color[0] = palette.getVibrantSwatch().getTitleTextColor();
            color[1] = palette.getVibrantSwatch().getBodyTextColor();
            color[2] = palette.getVibrantSwatch().getRgb();
        }else if (palette.getDarkMutedSwatch() != null){
            color[0] = palette.getDarkMutedSwatch().getTitleTextColor();
            color[1] = palette.getDarkMutedSwatch().getBodyTextColor();
            color[2] = palette.getDarkMutedSwatch().getRgb();
        }else {
            color[0] = ContextCompat.getColor(context, android.R.color.black);
            color[1] = ContextCompat.getColor(context, android.R.color.black);
            color[2] = ContextCompat.getColor(context, R.color.colorAccent);
        }
        return color;
    }
public static int [ ] paletteColor ( Context context , Palette palette ) { int color [ ] = new int [ 3 ] ; if ( palette . getDarkVibrantSwatch ( ) != null ) { color [ 0 ] = palette . getDarkVibrantSwatch ( ) . getTitleTextColor ( ) ; color [ 1 ] = palette . getDarkVibrantSwatch ( ) . getBodyTextColor ( ) ; color [ 2 ] = palette . getDarkVibrantSwatch ( ) . getRgb ( ) ; } else if ( palette . getDarkMutedSwatch ( ) != null ) { color [ 0 ] = palette . getDarkMutedSwatch ( ) . getTitleTextColor ( ) ; color [ 1 ] = palette . getDarkMutedSwatch ( ) . getBodyTextColor ( ) ; color [ 2 ] = palette . getDarkMutedSwatch ( ) . getRgb ( ) ; } else if ( palette . getVibrantSwatch ( ) != null ) { color [ 0 ] = palette . getVibrantSwatch ( ) . getTitleTextColor ( ) ; color [ 1 ] = palette . getVibrantSwatch ( ) . getBodyTextColor ( ) ; color [ 2 ] = palette . getVibrantSwatch ( ) . getRgb ( ) ; } else if ( palette . getDarkMutedSwatch ( ) != null ) { color [ 0 ] = palette . getDarkMutedSwatch ( ) . getTitleTextColor ( ) ; color [ 1 ] = palette . getDarkMutedSwatch ( ) . getBodyTextColor ( ) ; color [ 2 ] = palette . getDarkMutedSwatch ( ) . getRgb ( ) ; } else { color [ 0 ] = ContextCompat . getColor ( context , android . R . color . black ) ; color [ 1 ] = ContextCompat . getColor ( context , android . R . color . black ) ; color [ 2 ] = ContextCompat . getColor ( context , R . color . colorAccent ) ; } return color ; }
store pallete color in int array
 @param context
 @param palette
 @return
store pallete color in int array @param context @param palette @return