aboutsummaryrefslogtreecommitdiff
path: root/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-12-24 01:17:31 -0500
committerGitHub <noreply@github.com>2018-12-24 01:17:31 -0500
commitfb90c4a4ab23f2fd246c29c1dde4d6e155a2e38b (patch)
treecc6d67461b6caa256043b9482f7646831d528a08 /colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
parenta380adea1052d39f23c9c4d432a9380ce347d6c4 (diff)
downloadkau-fb90c4a4ab23f2fd246c29c1dde4d6e155a2e38b.tar.gz
kau-fb90c4a4ab23f2fd246c29c1dde4d6e155a2e38b.tar.bz2
kau-fb90c4a4ab23f2fd246c29c1dde4d6e155a2e38b.zip
Enhancement/ktlint (#179)
* Add spotless dependency * Apply ktlint * Add license headers
Diffstat (limited to 'colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt')
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt169
1 files changed, 96 insertions, 73 deletions
diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
index 68e3461..d9db160 100644
--- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.colorpicker
import android.graphics.Color
@@ -9,29 +24,31 @@ internal object ColorPalette {
val PRIMARY_COLORS: IntArray by lazy {
colorArrayOf(
- "#F44336",
- "#E91E63",
- "#9C27B0",
- "#673AB7",
- "#3F51B5",
- "#2196F3",
- "#03A9F4",
- "#00BCD4",
- "#009688",
- "#4CAF50",
- "#8BC34A",
- "#CDDC39",
- "#FFEB3B",
- "#FFC107",
- "#FF9800",
- "#FF5722",
- "#795548",
- "#9E9E9E",
- "#607D8B")
+ "#F44336",
+ "#E91E63",
+ "#9C27B0",
+ "#673AB7",
+ "#3F51B5",
+ "#2196F3",
+ "#03A9F4",
+ "#00BCD4",
+ "#009688",
+ "#4CAF50",
+ "#8BC34A",
+ "#CDDC39",
+ "#FFEB3B",
+ "#FFC107",
+ "#FF9800",
+ "#FF5722",
+ "#795548",
+ "#9E9E9E",
+ "#607D8B"
+ )
}
val PRIMARY_COLORS_SUB: Array<IntArray> by lazy {
- arrayOf(colorArrayOf(
+ arrayOf(
+ colorArrayOf(
"#FFEBEE",
"#FFCDD2",
"#EF9A9A",
@@ -42,7 +59,7 @@ internal object ColorPalette {
"#D32F2F",
"#C62828",
"#B71C1C"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FCE4EC",
"#F8BBD0",
"#F48FB1",
@@ -53,7 +70,7 @@ internal object ColorPalette {
"#C2185B",
"#AD1457",
"#880E4F"
- ), colorArrayOf(
+ ), colorArrayOf(
"#F3E5F5",
"#E1BEE7",
"#CE93D8",
@@ -64,7 +81,7 @@ internal object ColorPalette {
"#7B1FA2",
"#6A1B9A",
"#4A148C"
- ), colorArrayOf(
+ ), colorArrayOf(
"#EDE7F6",
"#D1C4E9",
"#B39DDB",
@@ -75,7 +92,7 @@ internal object ColorPalette {
"#512DA8",
"#4527A0",
"#311B92"
- ), colorArrayOf(
+ ), colorArrayOf(
"#E8EAF6",
"#C5CAE9",
"#9FA8DA",
@@ -86,7 +103,7 @@ internal object ColorPalette {
"#303F9F",
"#283593",
"#1A237E"
- ), colorArrayOf(
+ ), colorArrayOf(
"#E3F2FD",
"#BBDEFB",
"#90CAF9",
@@ -97,7 +114,7 @@ internal object ColorPalette {
"#1976D2",
"#1565C0",
"#0D47A1"
- ), colorArrayOf(
+ ), colorArrayOf(
"#E1F5FE",
"#B3E5FC",
"#81D4FA",
@@ -108,7 +125,7 @@ internal object ColorPalette {
"#0288D1",
"#0277BD",
"#01579B"
- ), colorArrayOf(
+ ), colorArrayOf(
"#E0F7FA",
"#B2EBF2",
"#80DEEA",
@@ -119,7 +136,7 @@ internal object ColorPalette {
"#0097A7",
"#00838F",
"#006064"
- ), colorArrayOf(
+ ), colorArrayOf(
"#E0F2F1",
"#B2DFDB",
"#80CBC4",
@@ -130,7 +147,7 @@ internal object ColorPalette {
"#00796B",
"#00695C",
"#004D40"
- ), colorArrayOf(
+ ), colorArrayOf(
"#E8F5E9",
"#C8E6C9",
"#A5D6A7",
@@ -141,7 +158,7 @@ internal object ColorPalette {
"#388E3C",
"#2E7D32",
"#1B5E20"
- ), colorArrayOf(
+ ), colorArrayOf(
"#F1F8E9",
"#DCEDC8",
"#C5E1A5",
@@ -152,7 +169,7 @@ internal object ColorPalette {
"#689F38",
"#558B2F",
"#33691E"
- ), colorArrayOf(
+ ), colorArrayOf(
"#F9FBE7",
"#F0F4C3",
"#E6EE9C",
@@ -163,7 +180,7 @@ internal object ColorPalette {
"#AFB42B",
"#9E9D24",
"#827717"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FFFDE7",
"#FFF9C4",
"#FFF59D",
@@ -174,7 +191,7 @@ internal object ColorPalette {
"#FBC02D",
"#F9A825",
"#F57F17"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FFF8E1",
"#FFECB3",
"#FFE082",
@@ -185,7 +202,7 @@ internal object ColorPalette {
"#FFA000",
"#FF8F00",
"#FF6F00"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FFF3E0",
"#FFE0B2",
"#FFCC80",
@@ -196,7 +213,7 @@ internal object ColorPalette {
"#F57C00",
"#EF6C00",
"#E65100"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FBE9E7",
"#FFCCBC",
"#FFAB91",
@@ -207,7 +224,7 @@ internal object ColorPalette {
"#E64A19",
"#D84315",
"#BF360C"
- ), colorArrayOf(
+ ), colorArrayOf(
"#EFEBE9",
"#D7CCC8",
"#BCAAA4",
@@ -218,7 +235,7 @@ internal object ColorPalette {
"#5D4037",
"#4E342E",
"#3E2723"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FAFAFA",
"#F5F5F5",
"#EEEEEE",
@@ -229,7 +246,7 @@ internal object ColorPalette {
"#616161",
"#424242",
"#212121"
- ), colorArrayOf(
+ ), colorArrayOf(
"#ECEFF1",
"#CFD8DC",
"#B0BEC5",
@@ -239,111 +256,117 @@ internal object ColorPalette {
"#546E7A",
"#455A64",
"#37474F",
- "#263238"))
+ "#263238"
+ )
+ )
}
val ACCENT_COLORS: IntArray by lazy {
colorArrayOf(
- "#FF1744",
- "#F50057",
- "#D500F9",
- "#651FFF",
- "#3D5AFE",
- "#2979FF",
- "#00B0FF",
- "#00E5FF",
- "#1DE9B6",
- "#00E676",
- "#76FF03",
- "#C6FF00",
- "#FFEA00",
- "#FFC400",
- "#FF9100",
- "#FF3D00")
+ "#FF1744",
+ "#F50057",
+ "#D500F9",
+ "#651FFF",
+ "#3D5AFE",
+ "#2979FF",
+ "#00B0FF",
+ "#00E5FF",
+ "#1DE9B6",
+ "#00E676",
+ "#76FF03",
+ "#C6FF00",
+ "#FFEA00",
+ "#FFC400",
+ "#FF9100",
+ "#FF3D00"
+ )
}
val ACCENT_COLORS_SUB: Array<IntArray> by lazy {
- arrayOf(colorArrayOf("#FF8A80",
+ arrayOf(
+ colorArrayOf(
+ "#FF8A80",
"#FF5252",
"#FF1744",
"#D50000"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FF80AB",
"#FF4081",
"#F50057",
"#C51162"
- ), colorArrayOf(
+ ), colorArrayOf(
"#EA80FC",
"#E040FB",
"#D500F9",
"#AA00FF"
- ), colorArrayOf(
+ ), colorArrayOf(
"#B388FF",
"#7C4DFF",
"#651FFF",
"#6200EA"
- ), colorArrayOf(
+ ), colorArrayOf(
"#8C9EFF",
"#536DFE",
"#3D5AFE",
"#304FFE"
- ), colorArrayOf(
+ ), colorArrayOf(
"#82B1FF",
"#448AFF",
"#2979FF",
"#2962FF"
- ), colorArrayOf(
+ ), colorArrayOf(
"#80D8FF",
"#40C4FF",
"#00B0FF",
"#0091EA"
- ), colorArrayOf(
+ ), colorArrayOf(
"#84FFFF",
"#18FFFF",
"#00E5FF",
"#00B8D4"
- ), colorArrayOf(
+ ), colorArrayOf(
"#A7FFEB",
"#64FFDA",
"#1DE9B6",
"#00BFA5"
- ), colorArrayOf(
+ ), colorArrayOf(
"#B9F6CA",
"#69F0AE",
"#00E676",
"#00C853"
- ), colorArrayOf(
+ ), colorArrayOf(
"#CCFF90",
"#B2FF59",
"#76FF03",
"#64DD17"
- ), colorArrayOf(
+ ), colorArrayOf(
"#F4FF81",
"#EEFF41",
"#C6FF00",
"#AEEA00"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FFFF8D",
"#FFFF00",
"#FFEA00",
"#FFD600"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FFE57F",
"#FFD740",
"#FFC400",
"#FFAB00"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FFD180",
"#FFAB40",
"#FF9100",
"#FF6D00"
- ), colorArrayOf(
+ ), colorArrayOf(
"#FF9E80",
"#FF6E40",
"#FF3D00",
- "#DD2C00"))
+ "#DD2C00"
+ )
+ )
}
private fun colorArrayOf(vararg colors: String) = colors.map { Color.parseColor(it) }.toIntArray()
}
-