Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Colours #46

Open
iforwms opened this issue Jul 31, 2024 · 1 comment
Open

Missing Colours #46

iforwms opened this issue Jul 31, 2024 · 1 comment

Comments

@iforwms
Copy link

iforwms commented Jul 31, 2024

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
Copy link
Collaborator

MatHazak commented Aug 2, 2024

Some notes worth mentioning:

  • Missing colors are more of a bug than a UI issue. Trello's API document is outdated, and the actual response contains color values that TrelloWidget can't map properly.
  • In Trello's web app, there are two sets of color values based on theme. The ones mentioned above are the Light theme values.
  • TrelloWidget has a customizable theme, and the resulting label colors have a factor of the foreground color to create a rather responsive UI.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants