1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-07-01 07:46:46 +02:00
dandelion/app/src/main/java/com/github/dfa/diaspora_android/ui/theme/ColorPalette.java

289 lines
17 KiB
Java
Raw Normal View History

2016-10-26 16:23:14 +02:00
package com.github.dfa.diaspora_android.ui.theme;
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
import android.content.Context;
import android.graphics.Color;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.ColorUtils;
import com.github.dfa.diaspora_android.R;
/**
2016-11-08 20:41:53 +01:00
* Class that handles Colors
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
* Created by dnld on 24/02/16.
*/
public class ColorPalette {
public static int[] getAccentColors(Context context) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
return new int[]{
ContextCompat.getColor(context, R.color.md_red_500),
ContextCompat.getColor(context, R.color.md_purple_500),
ContextCompat.getColor(context, R.color.md_deep_purple_500),
ContextCompat.getColor(context, R.color.md_blue_500),
ContextCompat.getColor(context, R.color.md_light_blue_500),
ContextCompat.getColor(context, R.color.md_cyan_500),
ContextCompat.getColor(context, R.color.md_teal_500),
ContextCompat.getColor(context, R.color.md_green_500),
ContextCompat.getColor(context, R.color.md_yellow_500),
ContextCompat.getColor(context, R.color.md_orange_500),
ContextCompat.getColor(context, R.color.md_deep_orange_500),
ContextCompat.getColor(context, R.color.md_brown_500),
ContextCompat.getColor(context, R.color.md_blue_grey_500),
};
}
public static int getObscuredColor(int c) {
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
float[] hsv = new float[3];
int color = c;
Color.colorToHSV(color, hsv);
hsv[2] *= 0.85f; // value component
color = Color.HSVToColor(hsv);
return color;
}
public static int getTransparentColor(int color, int alpha) {
return ColorUtils.setAlphaComponent(color, alpha);
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
}
public static int[] getTransparencyShadows(int color) {
int[] shadows = new int[10];
for (int i = 0; i < 10; i++)
shadows[i] = (ColorPalette.getTransparentColor(color, ((100 - (i * 10)) * 255) / 100));
Proxy tor preset Set windowSoftInputMode to adjustResize, Repair sharing text into app, Repair image sharing on 4.2 Fix view intent Update TR; Update buildToolsVersion -> 24.0.2 Update ISSUE_TEMPLATE.md Update README.md Switch ic_launcher back to png Replace blowball image on splash with character Reworked UI using Fragments Merge branch 'master' into rework_fragments Update README.md Fixed top/bottom menu entry population Added HashtagFragment Moved WebClients and ChromeClients to webview package Removed SplashActivity, migrated PodSelectionActivity to PodSelectionFragment Merge branch 'master' into rework_fragments Handle Intent.Action.Main in handleIntent() Update strings-about.xml Fixed image sharing to other apps Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked Removed test Fragments and old SplashActivity related stuff Merge branch 'master' into rework_fragments Added some documentation to MainActivity Fixed clear webview cache. Thanks @di72nn Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background) Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Proxy tor preset Reworked custom themes Set customtab color Do not open load the stream when clicked on toolbar Added note about customtabs and proxys. Fixes #77 Resolved merge conflicts Removed duplicate method getAppSettings Fixed default color was id instead of color value bug Update TR Some improvements of code quality Moved colorpicker repo up Fixed applying of settings Fixed bug causing ClassCastException Moved ThemeHelper and ColorPalette to util.theming Added missing license headers to source files Merge branch 'master' into proper-themes Apply nav-slider entry visibilities in onResume SettingsActivity: Switched to Toolbar and fixed toolbar color issue Fixed BrowserFragment reloading in onResume and added credits to LeafPic Added reference to ColorPicker in 3rd party licenses and updated support libraries Merged master Fixed applying proxy settings Merged master proxy changes Fixed nav slider layout color issue Merge branch 'proper-themes' of github.com:Diaspora-for-Android/diaspora-android into proper-themes
2016-10-13 16:56:31 +02:00
return shadows;
}
public static int[] getBaseColors(Context context) {
return new int[]{
ContextCompat.getColor(context, R.color.md_red_500),
ContextCompat.getColor(context, R.color.md_pink_500),
ContextCompat.getColor(context, R.color.md_purple_500),
ContextCompat.getColor(context, R.color.md_deep_purple_500),
ContextCompat.getColor(context, R.color.md_indigo_500),
ContextCompat.getColor(context, R.color.md_blue_500),
ContextCompat.getColor(context, R.color.md_light_blue_500),
ContextCompat.getColor(context, R.color.md_cyan_500),
ContextCompat.getColor(context, R.color.md_teal_500),
ContextCompat.getColor(context, R.color.md_green_500),
ContextCompat.getColor(context, R.color.md_light_green_500),
ContextCompat.getColor(context, R.color.md_lime_500),
ContextCompat.getColor(context, R.color.md_yellow_500),
ContextCompat.getColor(context, R.color.md_amber_500),
ContextCompat.getColor(context, R.color.md_orange_500),
ContextCompat.getColor(context, R.color.md_deep_orange_500),
ContextCompat.getColor(context, R.color.md_brown_500),
ContextCompat.getColor(context, R.color.md_blue_grey_500),
ContextCompat.getColor(context, R.color.md_grey_500)
};
}
public static int[] getColors(Context context, int c) {
if (c == ContextCompat.getColor(context, R.color.md_red_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_red_200),
ContextCompat.getColor(context, R.color.md_red_300),
ContextCompat.getColor(context, R.color.md_red_400),
ContextCompat.getColor(context, R.color.md_red_500),
ContextCompat.getColor(context, R.color.md_red_600),
ContextCompat.getColor(context, R.color.md_red_700),
ContextCompat.getColor(context, R.color.md_red_800),
ContextCompat.getColor(context, R.color.md_red_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_pink_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_pink_200),
ContextCompat.getColor(context, R.color.md_pink_300),
ContextCompat.getColor(context, R.color.md_pink_400),
ContextCompat.getColor(context, R.color.md_pink_500),
ContextCompat.getColor(context, R.color.md_pink_600),
ContextCompat.getColor(context, R.color.md_pink_700),
ContextCompat.getColor(context, R.color.md_pink_800),
ContextCompat.getColor(context, R.color.md_pink_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_purple_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_purple_200),
ContextCompat.getColor(context, R.color.md_purple_300),
ContextCompat.getColor(context, R.color.md_purple_400),
ContextCompat.getColor(context, R.color.md_purple_500),
ContextCompat.getColor(context, R.color.md_purple_600),
ContextCompat.getColor(context, R.color.md_purple_700),
ContextCompat.getColor(context, R.color.md_purple_800),
ContextCompat.getColor(context, R.color.md_purple_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_deep_purple_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_deep_purple_200),
ContextCompat.getColor(context, R.color.md_deep_purple_300),
ContextCompat.getColor(context, R.color.md_deep_purple_400),
ContextCompat.getColor(context, R.color.md_deep_purple_500),
ContextCompat.getColor(context, R.color.md_deep_purple_600),
ContextCompat.getColor(context, R.color.md_deep_purple_700),
ContextCompat.getColor(context, R.color.md_deep_purple_800),
ContextCompat.getColor(context, R.color.md_deep_purple_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_indigo_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_indigo_200),
ContextCompat.getColor(context, R.color.md_indigo_300),
ContextCompat.getColor(context, R.color.md_indigo_400),
ContextCompat.getColor(context, R.color.md_indigo_500),
ContextCompat.getColor(context, R.color.md_indigo_600),
ContextCompat.getColor(context, R.color.md_indigo_700),
ContextCompat.getColor(context, R.color.md_indigo_800),
ContextCompat.getColor(context, R.color.md_indigo_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_blue_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_blue_200),
ContextCompat.getColor(context, R.color.md_blue_300),
ContextCompat.getColor(context, R.color.md_blue_400),
ContextCompat.getColor(context, R.color.md_blue_500),
ContextCompat.getColor(context, R.color.md_blue_600),
ContextCompat.getColor(context, R.color.md_blue_650),
ContextCompat.getColor(context, R.color.md_blue_700),
ContextCompat.getColor(context, R.color.md_blue_750),
ContextCompat.getColor(context, R.color.md_blue_800),
ContextCompat.getColor(context, R.color.md_blue_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_light_blue_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_light_blue_200),
ContextCompat.getColor(context, R.color.md_light_blue_300),
ContextCompat.getColor(context, R.color.md_light_blue_400),
ContextCompat.getColor(context, R.color.md_light_blue_500),
ContextCompat.getColor(context, R.color.md_light_blue_600),
ContextCompat.getColor(context, R.color.md_light_blue_700),
ContextCompat.getColor(context, R.color.md_light_blue_800),
ContextCompat.getColor(context, R.color.md_light_blue_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_cyan_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_cyan_200),
ContextCompat.getColor(context, R.color.md_cyan_300),
ContextCompat.getColor(context, R.color.md_cyan_400),
ContextCompat.getColor(context, R.color.md_cyan_500),
ContextCompat.getColor(context, R.color.md_cyan_600),
ContextCompat.getColor(context, R.color.md_cyan_700),
ContextCompat.getColor(context, R.color.md_cyan_800),
ContextCompat.getColor(context, R.color.md_cyan_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_teal_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_teal_200),
ContextCompat.getColor(context, R.color.md_teal_300),
ContextCompat.getColor(context, R.color.md_teal_400),
ContextCompat.getColor(context, R.color.md_teal_500),
ContextCompat.getColor(context, R.color.md_teal_600),
ContextCompat.getColor(context, R.color.md_teal_700),
ContextCompat.getColor(context, R.color.md_teal_800),
ContextCompat.getColor(context, R.color.md_teal_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_green_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_green_200),
ContextCompat.getColor(context, R.color.md_green_300),
ContextCompat.getColor(context, R.color.md_green_400),
ContextCompat.getColor(context, R.color.md_green_500),
ContextCompat.getColor(context, R.color.md_green_600),
ContextCompat.getColor(context, R.color.md_green_700),
ContextCompat.getColor(context, R.color.md_green_800),
ContextCompat.getColor(context, R.color.md_green_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_light_green_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_light_green_200),
ContextCompat.getColor(context, R.color.md_light_green_300),
ContextCompat.getColor(context, R.color.md_light_green_400),
ContextCompat.getColor(context, R.color.md_light_green_500),
ContextCompat.getColor(context, R.color.md_light_green_600),
ContextCompat.getColor(context, R.color.md_light_green_700),
ContextCompat.getColor(context, R.color.md_light_green_800),
ContextCompat.getColor(context, R.color.md_light_green_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_lime_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_lime_200),
ContextCompat.getColor(context, R.color.md_lime_300),
ContextCompat.getColor(context, R.color.md_lime_400),
ContextCompat.getColor(context, R.color.md_lime_500),
ContextCompat.getColor(context, R.color.md_lime_600),
ContextCompat.getColor(context, R.color.md_lime_700),
ContextCompat.getColor(context, R.color.md_lime_800),
ContextCompat.getColor(context, R.color.md_lime_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_yellow_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_yellow_400),
ContextCompat.getColor(context, R.color.md_yellow_500),
ContextCompat.getColor(context, R.color.md_yellow_600),
ContextCompat.getColor(context, R.color.md_yellow_700),
ContextCompat.getColor(context, R.color.md_yellow_800),
ContextCompat.getColor(context, R.color.md_yellow_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_amber_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_amber_200),
ContextCompat.getColor(context, R.color.md_amber_300),
ContextCompat.getColor(context, R.color.md_amber_400),
ContextCompat.getColor(context, R.color.md_amber_500),
ContextCompat.getColor(context, R.color.md_amber_600),
ContextCompat.getColor(context, R.color.md_amber_700),
ContextCompat.getColor(context, R.color.md_amber_800),
ContextCompat.getColor(context, R.color.md_amber_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_orange_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_orange_200),
ContextCompat.getColor(context, R.color.md_orange_300),
ContextCompat.getColor(context, R.color.md_orange_400),
ContextCompat.getColor(context, R.color.md_orange_500),
ContextCompat.getColor(context, R.color.md_orange_600),
ContextCompat.getColor(context, R.color.md_orange_700),
ContextCompat.getColor(context, R.color.md_orange_800),
ContextCompat.getColor(context, R.color.md_orange_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_deep_orange_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_deep_orange_200),
ContextCompat.getColor(context, R.color.md_deep_orange_300),
ContextCompat.getColor(context, R.color.md_deep_orange_400),
ContextCompat.getColor(context, R.color.md_deep_orange_500),
ContextCompat.getColor(context, R.color.md_deep_orange_600),
ContextCompat.getColor(context, R.color.md_deep_orange_650),
ContextCompat.getColor(context, R.color.md_deep_orange_700),
ContextCompat.getColor(context, R.color.md_deep_orange_800),
ContextCompat.getColor(context, R.color.md_deep_orange_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_brown_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_brown_200),
ContextCompat.getColor(context, R.color.md_brown_300),
ContextCompat.getColor(context, R.color.md_brown_400),
ContextCompat.getColor(context, R.color.md_brown_500),
ContextCompat.getColor(context, R.color.md_brown_600),
ContextCompat.getColor(context, R.color.md_brown_700),
ContextCompat.getColor(context, R.color.md_brown_800),
ContextCompat.getColor(context, R.color.md_brown_900)
};
} else if (c == ContextCompat.getColor(context, R.color.md_grey_500)) {
return new int[]{
ContextCompat.getColor(context, R.color.md_grey_400),
ContextCompat.getColor(context, R.color.md_grey_500),
ContextCompat.getColor(context, R.color.md_grey_600),
ContextCompat.getColor(context, R.color.md_grey_700),
ContextCompat.getColor(context, R.color.md_grey_800),
ContextCompat.getColor(context, R.color.md_grey_900),
Color.parseColor("#000000")
};
} else {
return new int[]{
ContextCompat.getColor(context, R.color.md_blue_grey_300),
ContextCompat.getColor(context, R.color.md_blue_grey_400),
ContextCompat.getColor(context, R.color.md_blue_grey_500),
ContextCompat.getColor(context, R.color.md_blue_grey_600),
ContextCompat.getColor(context, R.color.md_blue_grey_700),
ContextCompat.getColor(context, R.color.md_blue_grey_800),
ContextCompat.getColor(context, R.color.md_blue_grey_900)
};
}
}
}