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

define color space for contacts #637

Open
audax opened this issue Oct 24, 2016 · 2 comments
Open

define color space for contacts #637

audax opened this issue Oct 24, 2016 · 2 comments

Comments

@audax
Copy link
Member

audax commented Oct 24, 2016

@jmt85 commented on Mon Mar 07 2016

the avatar background should get a defined color space

The coler should calculate from e-mail and Name

the color space comes from Britta


@mr-gosh commented on Thu Mar 10 2016

it should be used the same color calculation in desktop and android - if possible...


@mr-gosh commented on Thu Aug 11 2016

we could check how other projects define there avatar background colors,
or we just use https://github.com/wada811/Android-Material-Design-Colors/blob/master/library/src/main/res/values/colors.xml and in every "normal" color (not grey or blue-grey) we use the color-rooms 500 - 900 except yellow there it sould be 600 - 900.


@mr-gosh commented on Thu Aug 11 2016

    <color name="md_red_500">#f44336</color>
    <color name="md_red_600">#e53935</color>
    <color name="md_red_700">#d32f2f</color>
    <color name="md_red_800">#c62828</color>
    <color name="md_red_900">#b71c1c</color>
    <color name="md_pink_500">#e91e63</color>
    <color name="md_pink_600">#d81b60</color>
    <color name="md_pink_700">#c2185b</color>
    <color name="md_pink_800">#ad1457</color>
    <color name="md_pink_900">#880e4f</color>
    <color name="md_purple_500">#9c27b0</color>
    <color name="md_purple_600">#8e24aa</color>
    <color name="md_purple_700">#7b1fa2</color>
    <color name="md_purple_800">#6a1b9a</color>
    <color name="md_purple_900">#4a148c</color>
    <color name="md_deep_purple_500">#673ab7</color>
    <color name="md_deep_purple_600">#5e35b1</color>
    <color name="md_deep_purple_700">#512da8</color>
    <color name="md_deep_purple_800">#4527a0</color>
    <color name="md_deep_purple_900">#311b92</color>
    <color name="md_indigo_500">#3f51b5</color>
    <color name="md_indigo_600">#3949ab</color>
    <color name="md_indigo_700">#303f9f</color>
    <color name="md_indigo_800">#283593</color>
    <color name="md_indigo_900">#1a237e</color>
    <color name="md_blue_500">#2196f3</color>
    <color name="md_blue_600">#1e88e5</color>
    <color name="md_blue_700">#1976d2</color>
    <color name="md_blue_800">#1565c0</color>
    <color name="md_blue_900">#0d47a1</color>
    <color name="md_light_blue_500">#03a9f4</color>
    <color name="md_light_blue_600">#039be5</color>
    <color name="md_light_blue_700">#0288d1</color>
    <color name="md_light_blue_800">#0277bd</color>
    <color name="md_light_blue_900">#01579b</color>
    <color name="md_cyan_500">#00bcd4</color>
    <color name="md_cyan_600">#00acc1</color>
    <color name="md_cyan_700">#0097a7</color>
    <color name="md_cyan_800">#00838f</color>
    <color name="md_cyan_900">#006064</color>
    <color name="md_teal_500">#009688</color>
    <color name="md_teal_600">#00897b</color>
    <color name="md_teal_700">#00796b</color>
    <color name="md_teal_800">#00695c</color>
    <color name="md_teal_900">#004d40</color>
    <color name="md_green_500">#4caf50</color>
    <color name="md_green_600">#43a047</color>
    <color name="md_green_700">#388e3c</color>
    <color name="md_green_800">#2e7d32</color>
    <color name="md_green_900">#1b5e20</color>
    <color name="md_light_green_500">#8bc34a</color>
    <color name="md_light_green_600">#7cb342</color>
    <color name="md_light_green_700">#689f38</color>
    <color name="md_light_green_800">#558b2f</color>
    <color name="md_light_green_900">#33691e</color>
    <color name="md_lime_600">#c0ca33</color>
    <color name="md_lime_700">#afb42b</color>
    <color name="md_lime_800">#9e9d24</color>
    <color name="md_lime_900">#827717</color>
    <color name="md_yellow_600">#fdd835</color>
    <color name="md_yellow_700">#fbc02d</color>
    <color name="md_yellow_800">#f9a825</color>
    <color name="md_yellow_900">#f57f17</color>
    <color name="md_amber_500">#ffc107</color>
    <color name="md_amber_600">#ffb300</color>
    <color name="md_amber_700">#ffa000</color>
    <color name="md_amber_800">#ff8f00</color>
    <color name="md_amber_900">#ff6f00</color>
    <color name="md_orange_500">#ff9800</color>
    <color name="md_orange_600">#fb8c00</color>
    <color name="md_orange_700">#f57c00</color>
    <color name="md_orange_800">#ef6c00</color>
    <color name="md_orange_900">#e65100</color>
    <color name="md_deep_orange_500">#ff5722</color>
    <color name="md_deep_orange_600">#f4511e</color>
    <color name="md_deep_orange_700">#e64a19</color>
    <color name="md_deep_orange_800">#d84315</color>
    <color name="md_deep_orange_900">#bf360c</color>
    <color name="md_brown_500">#795548</color>
    <color name="md_brown_600">#6d4c41</color>
    <color name="md_brown_700">#5d4037</color>
    <color name="md_brown_800">#4e342e</color>
    <color name="md_brown_900">#3e2723</color>


@mr-gosh commented on Thu Aug 11 2016

please use this fixed list of colours for the avatar backgrounds - and the colour must be cross platform - so whatever you calculate should result in the same colour - no matter which platform i use...


@mr-gosh commented on Thu Aug 11 2016

or we go the signal way: https://github.com/WhisperSystems/Signal-Android/blob/ec63f7014e5e67993ac0793cc94de092d2b7eca6/src/org/thoughtcrime/securesms/contacts/avatars/ContactColors.java


@julianseeger commented on Thu Aug 11 2016

linked the android colors at Qabel/qabel-desktop#408


@mr-gosh commented on Thu Sep 29 2016

@JoGir here they are

@audax
Copy link
Member Author

audax commented Oct 24, 2016

The color space should be defined in the core and used in both clients.

@julianseeger
Copy link
Collaborator

julianseeger commented Oct 27, 2016

What about actually storing the color in the contact?
We need it in increasingly more places (the avatar in the new chat ui is colored for example) and that would open the implementation for extensions like a color picker. ...an extension method to Contact could be an intermediate solution... Contact.color that resolves to an enum with the color codes defined above. We could then fallback to a random (or deterministic alias-based) pick from this enum and later switch that implementation to something that changes an actual property of that contact IF we need it ^^

edit: new title proposal define color space for contacts

@audax audax changed the title define color space for Avatar background define color space for contacts Oct 27, 2016
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