Skip to content

Conversation

@veerack
Copy link
Contributor

@veerack veerack commented Sep 8, 2021

discord.Color.transparent() -> Method that returns a cls(0x2F3136) (embed bg color)

Summary

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

discord.Color.transparent() -> Method that returns a cls(0x2F3136) (embed bg color)
@zeffo
Copy link
Contributor

zeffo commented Sep 8, 2021

This is not transparent for light mode users or AMOLED mobile users.

@veerack
Copy link
Contributor Author

veerack commented Sep 8, 2021

This is not transparent for light mode users or AMOLED mobile users

as i know, for light/amoled themes there's any color that can be considered transparent.. it should be just an utility to have a "transparent" color ready to use, instead need to search for it. (another consideration: there's still people that seriously use light mode?)

Co-authored-by: proguy914629 <74696067+proguy914629bot@users.noreply.github.com>
@marzeq
Copy link

marzeq commented Sep 8, 2021

This is not transparent for light mode users or AMOLED mobile users

as i know, for light/amoled themes there's any color that can be considered transparent.. it should be just an utility to have a "transparent" color ready to use, instead need to search for it. (another consideration: there's still people that seriously use light mode?)

You shouldn't leave out a minority. This also could be misleading that it's actually a transparent colour.

@izxxr

This comment has been minimized.

@marzeq

This comment has been minimized.

@izxxr

This comment has been minimized.

@izxxr

This comment has been minimized.

@cbrxyz
Copy link

cbrxyz commented Sep 8, 2021

Yes, I agree. I think adding this method is fine, but it just can't be called transparent because it's not transparent. It may give a transparent effect on some dark theme interfaces, but it is not transparent.

Copy link
Contributor

@BobDotCom BobDotCom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if this was changed to have a parameter theme of type Literal("dark", "light", "amoled") and defaulted to "dark", each theme corresponding to its inherent theme, it would work. I would also suggest that classmethods be added for light and amoled, and this method accessed those.

@cbrxyz
Copy link

cbrxyz commented Sep 9, 2021

I think if this was changed to have a parameter theme of type Literal("dark", "light", "amoled") and defaulted to "dark", each theme corresponding to its inherent theme, it would work. I would also suggest that classmethods be added for light and amoled, and this method accessed those.

I personally don't like this either, because again, this isn't transparent. That's just a misleading method name. I understand where you're coming from, but "blending into one user's background" does not make something transparent.

Also, if Discord ever does create a transparent option for certain UI, then it will be helpful to not have this method implemented. However, I do like the idea of adding three explicit methods to match the dark/light/AMOLED colors.

@BobDotCom
Copy link
Contributor

I personally don't like this either, because again, this isn't transparent. That's just a misleading method name. I understand where you're coming from, but "blending into one user's background" does not make something transparent.

Also, if Discord ever does create a transparent option for certain UI, then it will be helpful to not have this method implemented. However, I do like the idea of adding three explicit methods to match the dark/light/AMOLED colors.

Maybe rename transparent to theme? either that or remove this method completely

@cbrxyz
Copy link

cbrxyz commented Sep 9, 2021

I personally don't like this either, because again, this isn't transparent. That's just a misleading method name. I understand where you're coming from, but "blending into one user's background" does not make something transparent.
Also, if Discord ever does create a transparent option for certain UI, then it will be helpful to not have this method implemented. However, I do like the idea of adding three explicit methods to match the dark/light/AMOLED colors.

Maybe rename transparent to theme? either that or remove this method completely

I would just suggest not adding this method. Even if you specified the theme, it will need a parameter, which I see you suggest as using Literal("dark", "light", "amoled"), but I don't think that aligns well with discord.py-esque syntax (I think a method like that should use an enum instead of a Literal of strings, like other methods where a parameter is a set of defined values).

But why even add another enum? I would just suggest making three new methods, something like dark_theme_sidebar (since dark_theme is already implemented), amoled_theme, and light_theme. No enum needed, and it's like all of the other colors.

@itznao
Copy link

itznao commented Sep 9, 2021

This is useless due to bots not being able to know which theme a user is using, this means that if someone choses 'light_transparent' for example, it wont show on dark theme vice versa.

@veerack
Copy link
Contributor Author

veerack commented Sep 19, 2021

i unluckily don't have amoled theme, if someone else have it, feel free to add cls for transparent embed for amoled by himself

Copy link
Contributor Author

@veerack veerack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed typo in constructor and changed classmethod name to embed_background with theme argument defaulted to "dark" (missing amoled)

@izxxr
Copy link
Contributor

izxxr commented Sep 19, 2021

i unluckily don't have amoled theme, if someone else have it, feel free to add cls for transparent embed for amoled by himself

It's just pure black.

@veerack veerack requested a review from BobDotCom October 28, 2021 13:04
@Lulalaby Lulalaby added feature Implements a feature priority: low Low Priority labels Oct 30, 2021
Copy link
Contributor

@BobDotCom BobDotCom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See suggested changes

veerack and others added 3 commits November 2, 2021 18:04
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
@Lulalaby Lulalaby enabled auto-merge November 2, 2021 17:06
@Lulalaby Lulalaby removed the status: awaiting review Awaiting review from a maintainer label Nov 2, 2021
Co-authored-by: Lala Sabathil <aiko@aitsys.dev>
auto-merge was automatically disabled November 2, 2021 17:07

Head branch was pushed to by a user without write access

@Lulalaby Lulalaby requested a review from BobDotCom November 2, 2021 17:08
Lulalaby
Lulalaby previously approved these changes Nov 2, 2021
@Lulalaby
Copy link
Member

Lulalaby commented Nov 2, 2021

oh

Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
@Lulalaby Lulalaby requested review from Dorukyum and Lulalaby November 2, 2021 21:45
@Dorukyum
Copy link
Member

Dorukyum commented Nov 4, 2021

Could you document the theme parameter?

@Lulalaby Lulalaby dismissed stale reviews from BobDotCom and Dorukyum November 10, 2021 00:20

Resolved

@Lulalaby Lulalaby enabled auto-merge November 10, 2021 00:21
@Lulalaby Lulalaby disabled auto-merge November 10, 2021 03:50
@Lulalaby Lulalaby enabled auto-merge (squash) November 10, 2021 03:51
@Lulalaby Lulalaby merged commit c4bd711 into Pycord-Development:master Nov 10, 2021
DA-344 pushed a commit to DA-344/pycord that referenced this pull request Oct 3, 2025
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Implements a feature priority: low Low Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.