oryanm / TrelloWidget

Android widget for Trello's lists
MIT License
62 stars 24 forks source link

Missing Colours #46

Open iforwms opened 4 months ago

iforwms commented 4 months ago

Only the basic colour palette is supported.

To support all colours you can update LabelColors.kt as follows (although I'm not sure why black labels dont appear):

package com.github.oryanmat.trellowidget.util.color

import android.graphics.Color

const val BLACK = "#8590A2"
const val BLACK_DARK = "#626F86"
const val BLACK_LIGHT = "#DCDFE4"
const val BLUE = "#579DFF"
const val BLUE_DARK = "#0C66E4"
const val BLUE_LIGHT = "#CCE0FF"
const val GREEN = "#4BCE97"
const val GREEN_DARK = "#1F845A"
const val GREEN_LIGHT = "#BAF3DB"
const val LIME = "#94C748"
const val LIME_DARK = "#5B7F24"
const val LIME_LIGHT = "#D3F1A7"
const val ORANGE = "#FEA362"
const val ORANGE_DARK = "#C25100"
const val ORANGE_LIGHT = "#FEDEC8"
const val PINK = "#E774BB"
const val PINK_DARK = "#AE4787"
const val PINK_LIGHT = "#FDD0EC"
const val PURPLE = "#9F8FEF"
const val PURPLE_DARK = "#6E5DC6"
const val PURPLE_LIGHT = "#DFD8FD"
const val RED = "#F87168"
const val RED_DARK = "#C9372C"
const val RED_LIGHT = "#FFD5D2"
const val SKY = "#6CC3E0"
const val SKY_DARK = "#227D9B"
const val SKY_LIGHT = "#C6EDFB"
const val YELLOW = "#F5CD47"
const val YELLOW_DARK = "#946F00"
const val YELLOW_LIGHT = "#F8E6A0"

val colors = mapOf(
        "black" to Color.parseColor(BLACK),
        "black_dark" to Color.parseColor(BLACK_DARK),
        "black_light" to Color.parseColor(BLACK_LIGHT),
        "blue" to Color.parseColor(BLUE),
        "blue_dark" to Color.parseColor(BLUE_DARK),
        "blue_light" to Color.parseColor(BLUE_LIGHT),
        "green" to Color.parseColor(GREEN),
        "green_dark" to Color.parseColor(GREEN_DARK),
        "green_light" to Color.parseColor(GREEN_LIGHT),
        "lime" to Color.parseColor(LIME),
        "lime_dark" to Color.parseColor(LIME_DARK),
        "lime_light" to Color.parseColor(LIME_LIGHT),
        "orange" to Color.parseColor(ORANGE),
        "orange_dark" to Color.parseColor(ORANGE_DARK),
        "orange_light" to Color.parseColor(ORANGE_LIGHT),
        "pink" to Color.parseColor(PINK),
        "pink_dark" to Color.parseColor(PINK_DARK),
        "pink_light" to Color.parseColor(PINK_LIGHT),
        "purple" to Color.parseColor(PURPLE),
        "purple_dark" to Color.parseColor(PURPLE_DARK),
        "purple_light" to Color.parseColor(PURPLE_LIGHT),
        "red" to Color.parseColor(RED),
        "red_dark" to Color.parseColor(RED_DARK),
        "red_light" to Color.parseColor(RED_LIGHT),
        "sky" to Color.parseColor(SKY),
        "sky_dark" to Color.parseColor(SKY_DARK),
        "sky_light" to Color.parseColor(SKY_LIGHT),
        "yellow" to Color.parseColor(YELLOW),
        "yellow_dark" to Color.parseColor(YELLOW_DARK),
        "yellow_light" to Color.parseColor(YELLOW_LIGHT),
        null to Color.parseColor(BLACK_LIGHT))
MatHazak commented 3 months ago

Some notes worth mentioning:

Overall, I think it's perfectly fine to just add the missing colors, but one can discuss the approach to blending label colors based on custom theme.