TrelloWidget icon indicating copy to clipboard operation
TrelloWidget copied to clipboard

Missing Colours

Open iforwms opened this issue 1 year ago • 1 comments

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))

iforwms avatar Jul 31 '24 08:07 iforwms

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.

MatHazak avatar Aug 02 '24 18:08 MatHazak

@iforwms can you please post the source for the color hex values?

oryanm avatar Dec 01 '24 20:12 oryanm

the source for the color hex values

These values are the same as the light mode values in the Trello web app.

MatHazak avatar Dec 01 '24 20:12 MatHazak

@MatHazak sure but are we getting them by inspecting the web app code or is there a page somewhere that lists them?

oryanm avatar Dec 01 '24 21:12 oryanm

Is it a matter of concern? Overall, TrelloWidget has a customizable theme and blends these values. Trello's API document about labels seems outdated, and I don't think there's a page that mentions these values.

MatHazak avatar Dec 01 '24 21:12 MatHazak

@MatHazak sure but are we getting them by inspecting the web app code or is there a page somewhere that lists them?

I used dev tools in the Trello desktop app and got the values from there I think, it was a while ago.

iforwms avatar Dec 02 '24 00:12 iforwms

Alright no problem. We can definitely add this.

oryanm avatar Dec 02 '24 00:12 oryanm

Done.

oryanm avatar Dec 03 '24 12:12 oryanm