Skip to content

Refactor FXIOS-14620 [Autofill] Update AmEx card logo & add Discover dark mode#31840

Merged
lmarceau merged 4 commits intomozilla-mobile:mainfrom
janbrasna:upd/card-logos
Feb 2, 2026
Merged

Refactor FXIOS-14620 [Autofill] Update AmEx card logo & add Discover dark mode#31840
lmarceau merged 4 commits intomozilla-mobile:mainfrom
janbrasna:upd/card-logos

Conversation

@janbrasna
Copy link
Contributor

📜 Tickets

Jira ticket FXIOS-14620 (+FXIOS-14619)
GitHub issue #31626 (+#31624)

💡 Description

AmEx brand update for consistency with desktop & mobile: #31626 (comment)

Discover contrast in dark UI: #31624

This also renames the Visa inverse dark mode logo for consistency.

🎥 Demos

Before After
before after

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If needed, I updated documentation and added comments to complex code

@janbrasna janbrasna requested a review from a team as a code owner January 27, 2026 16:50
@janbrasna janbrasna requested a review from lmarceau January 27, 2026 16:50
@lmarceau
Copy link
Contributor

lmarceau commented Jan 27, 2026

Are the before and after screenshots inverted?

@lmarceau
Copy link
Contributor

lmarceau commented Jan 27, 2026

Ah ok I understand. We want the big Amex logo instead of the small one 🤔 I just want to double check with our PM first. Ill get back to you shortly. Thank you!

@janbrasna
Copy link
Contributor Author

Yeah the long "American Express" brand in full is being used mainly for the enterprise (but it does have different brand requirements to what's shown in the app anyways), whereas digital spaces and actual cards and/or their acceptance marks use predominantly this box logo.

I wouldn't have made the call myself, so the linked ticket refers to when (& how) Desktop and Fenix added this newer "AmEx" logo for the same affordance.

(No rush anywhere.)

Copy link
Contributor

@lmarceau lmarceau left a comment

Choose a reason for hiding this comment

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

Product is ok with the change 👍 Approving! I ran the BR and will merge when green

@janbrasna
Copy link
Contributor Author

Q: As I'm not expert in the PDF formats used in app bundling — I noticed (one of) the original vectors were a PDF 1.7 with "plain text" curves etc., and I see that what I got exported is an older simpler PDF 1.1 which however is not plain text, but appears binary, most likely compressed (which would explain the 90%+ file size saving on it) — not sure if there are any requirements for formats?

(E.g. … would one format version rasterize better/easier than any other?)

@mobiletest-ci-bot
Copy link

mobiletest-ci-bot commented Jan 27, 2026

🧹 Tidy commit

Just 5 file(s) touched. Thanks for keeping it clean and review-friendly!

✅ Per-file coverage

All changed files meet the threshold of 35.0%.

Generated by 🚫 Danger Swift against f0646a7

@lmarceau
Copy link
Contributor

@janbrasna where did you take the image from? Maybe we can ask our designers for guidance, just want to make sure I know what to ask for

@janbrasna
Copy link
Contributor Author

janbrasna commented Jan 27, 2026

The originals come from the respective brand assets — the 512×512 square exports however are created with some postscript tools I have, that prefer simplicity and size — which I'm not sure is the right approach for the Xcode assets to be rasterized on the fly, so I'm checking in case there's some tribal knowledge what standards to use for xcassets imageset PDFs.

(I basically took the existing PDFs as a blank slate, removed the contents, and juxtaposed the updated vectors onto the same canvas, hopefully keeping all the same prefs, profiles etc. for the change to be as minimal as possible.)

@lmarceau
Copy link
Contributor

I asked one of our designers for guidance, I'll let you know when I have an answer 🙏 Thank you

@janbrasna
Copy link
Contributor Author

So this is basically the difference:

expand for sources [+]

(this one is the existing asset:)

$ cat logo_discover.pdf 
%PDF-1.7

1 0 obj
  << /Length 2 0 R
     /Range [ 0.000000 1.000000 ]
     /Domain [ 0.000000 1.000000 ]
     /FunctionType 4
  >>
stream
{  0.000000 exch dup 0.000000 gt { exch pop dup 0.000000 sub 0.000000 mul 0.000000 add exch } if dup 0.328125 gt { exch pop dup 0.328125 sub 1.735857 mul 0.000000 add exch } if dup 0.760188 gt { exch pop dup 0.760188 sub 1.042485 mul 0.750000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
endstream
endobj

2 0 obj
  308
endobj

3 0 obj
  << /BBox [ 0.000000 0.000000 512.000000 512.000000 ]
     /Resources << /Pattern << /P1 << /Matrix [ -69.000008 88.000000 -91.959396 -72.104530 360.482849 231.049835 ]
                                      /Shading << /Coords [ 0.500000 0.500000 0.000000 0.500000 0.500000 0.500000 ]
                                                  /ColorSpace /DeviceGray
                                                  /Function 1 0 R
                                                  /Domain [ 0.000000 1.000000 ]
                                                  /ShadingType 3
                                                  /Extend [ true true ]
                                               >>
                                      /PatternType 2
                                      /Type /Pattern
                                   >> >> >>
     /Subtype /Form
     /Length 4 0 R
     /Group << /Type /Group
               /S /Transparency
               /CS /DeviceGray
            >>
     /Type /XObject
  >>
stream
/DeviceGray CS
/DeviceGray cs
1.000000 0.000000 -0.000000 1.000000 228.046875 215.203125 cm
85.162064 40.745396 m
85.162064 18.241005 66.106773 0.000763 42.579445 0.000763 c
19.058464 0.000763 0.000000 18.241005 0.000000 40.745396 c
0.000000 63.252819 19.058464 81.496094 42.579445 81.496094 c
66.106773 81.496094 85.162064 63.252819 85.162064 40.745396 c
/Pattern cs
/P1 scn
f*
n

endstream
endobj

4 0 obj
  381
endobj

5 0 obj
  << /Length 6 0 R
     /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
     /Domain [ 0.000000 1.000000 ]
     /FunctionType 4
  >>
stream
{  0.917647 exch 0.615686 exch 0.172549 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub -0.131466 mul 0.917647 add exch dup 0.000000 sub -0.466107 mul 0.615686 add exch dup 0.000000 sub -0.095612 mul 0.172549 add exch } if dup 0.328125 gt { exch pop exch pop exch pop dup 0.328125 sub -0.290444 mul 0.874510 add exch dup 0.328125 sub -0.390284 mul 0.462745 add exch dup 0.328125 sub -0.009076 mul 0.141176 add exch } if dup 0.760188 gt { exch pop exch pop exch pop dup 0.760188 sub -1.079278 mul 0.749020 add exch dup 0.760188 sub -0.441523 mul 0.294118 add exch dup 0.760188 sub -0.196232 mul 0.137255 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.490196 exch 0.188235 exch 0.090196 exch } if pop }
endstream
endobj

6 0 obj
  733
endobj

7 0 obj
  << /Length 8 0 R
     /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
     /Domain [ 0.000000 1.000000 ]
     /FunctionType 4
  >>
stream
{  0.902872 exch 0.468502 exch 0.186184 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub 0.014775 mul 0.902872 add exch dup 0.000000 sub 0.147184 mul 0.468502 add exch dup 0.000000 sub -0.013635 mul 0.186184 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.917647 exch 0.615686 exch 0.172549 exch } if pop }
endstream
endobj

8 0 obj
  337
endobj

9 0 obj
  << /ExtGState << /E1 << /SMask << /Type /Mask
                                    /G 3 0 R
                                    /S /Luminosity
                                 >>
                          /Type /ExtGState
                       >> >>
     /Pattern << /P2 << /Matrix [ -69.000008 88.000000 -91.959396 -72.104530 360.482849 231.049835 ]
                        /Shading << /Coords [ 0.500000 0.500000 0.000000 0.500000 0.500000 0.500000 ]
                                    /ColorSpace /DeviceRGB
                                    /Function 5 0 R
                                    /Domain [ 0.000000 1.000000 ]
                                    /ShadingType 3
                                    /Extend [ true true ]
                                 >>
                        /PatternType 2
                        /Type /Pattern
                     >>
                 /P1 << /Matrix [ 52.999996 -63.999992 63.999992 52.999996 174.523438 231.046875 ]
                        /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
                                    /ColorSpace /DeviceRGB
                                    /Function 7 0 R
                                    /Domain [ 0.000000 1.000000 ]
                                    /ShadingType 2
                                    /Extend [ true true ]
                                 >>
                        /PatternType 2
                        /Type /Pattern
                     >>
              >>
  >>
endobj

10 0 obj
  << /Length 11 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.000000 217.070312 cm
0.125490 0.113725 0.109804 scn
42.040150 19.467278 m
36.975021 15.136360 30.527048 13.242531 20.216003 13.242531 c
15.937444 13.242531 l
15.937444 64.925240 l
20.216003 64.925240 l
30.527048 64.925240 36.727631 63.158878 42.040150 58.612473 c
47.523937 53.914322 50.819286 46.666786 50.819286 39.170380 c
50.819286 31.637554 47.523937 24.132046 42.040150 19.467278 c
h
23.409973 78.164062 m
0.000000 78.164062 l
0.000000 -0.001892 l
23.267248 -0.001892 l
35.649384 -0.001892 44.587101 2.817612 52.421085 9.039322 c
61.726715 16.408257 67.248566 27.534500 67.248566 39.061359 c
67.248566 62.136326 49.233574 78.164062 23.409973 78.164062 c
h
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 74.597656 217.070312 cm
0.125490 0.113725 0.109804 scn
0.000000 78.164062 m
15.874125 78.164062 l
15.874125 -0.001892 l
0.000000 -0.001892 l
0.000000 78.164062 l
h
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 96.523438 215.179688 cm
0.125490 0.113725 0.109804 scn
32.931278 50.095158 m
23.349714 53.457916 20.549143 55.697731 20.549143 59.922428 c
20.549143 64.833031 25.554012 68.556953 32.436501 68.556953 c
37.206669 68.556953 41.136345 66.729889 45.322929 62.265434 c
53.610458 72.669350 l
46.762859 78.435814 38.567307 81.355469 29.632759 81.355469 c
15.176362 81.355469 4.158038 71.731544 4.158038 59.005863 c
4.158038 48.201328 9.280258 42.720154 24.228262 37.515160 c
30.476419 35.436195 33.651245 34.015823 35.259274 33.053734 c
38.443611 31.084034 40.029438 28.261501 40.029438 24.998894 c
40.029438 18.640606 34.764492 13.966736 27.647303 13.966736 c
20.070223 13.966736 13.939417 17.596573 10.269814 24.413139 c
0.000000 14.895439 l
7.342378 4.600784 16.143717 -0.000252 28.268948 -0.000252 c
44.805950 -0.000252 56.458603 10.594872 56.458603 25.684803 c
56.458603 38.119122 51.054108 43.755081 32.931278 50.095158 c
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 157.984375 215.332031 cm
0.125490 0.113725 0.109804 scn
0.000000 40.798904 m
0.000000 17.811951 18.855478 -0.000359 43.128143 -0.000359 c
49.972572 -0.000359 55.840130 1.292542 63.065155 4.555153 c
63.065155 22.519207 l
56.680618 16.379440 51.076309 13.957520 43.825909 13.957520 c
27.786858 13.957520 16.425993 25.062523 16.425993 40.908161 c
16.425993 55.879730 28.154766 67.740433 43.128143 67.740433 c
50.683022 67.740433 56.455429 65.178909 63.065155 58.948093 c
63.065155 76.890907 l
56.084347 80.268845 50.356342 81.667969 43.454823 81.667969 c
19.321712 81.667969 0.000000 63.506638 0.000000 40.798904 c
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 310.960938 215.093750 cm
0.125490 0.113725 0.109804 scn
39.150894 27.662758 m
17.367975 80.140625 l
0.000000 80.140625 l
34.628113 0.001938 l
43.169376 0.001938 l
78.469879 80.140625 l
61.238285 80.140625 l
39.150894 27.662758 l
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 396.660156 217.070312 cm
0.125490 0.113725 0.109804 scn
0.000000 -0.001892 m
45.173859 -0.001892 l
45.173859 13.242767 l
15.937557 13.242767 l
15.937557 34.341961 l
44.063778 34.341961 l
44.063778 47.583588 l
15.937557 47.583588 l
15.937557 64.925476 l
45.173859 64.925476 l
45.173859 78.164062 l
0.000000 78.164062 l
0.000000 -0.001892 l
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 452.351562 217.070312 cm
0.125490 0.113725 0.109804 scn
20.596685 42.220009 m
15.972414 42.220009 l
15.972414 65.862518 l
20.856760 65.862518 l
30.809410 65.862518 36.140961 61.865444 36.140961 54.250675 c
36.140961 46.426491 30.809410 42.220009 20.596685 42.220009 c
h
52.544785 55.101234 m
52.544785 69.738953 42.052956 78.164062 23.660536 78.164062 c
0.000000 78.164062 l
0.000000 -0.001892 l
15.972446 -0.001892 l
15.972446 31.425346 l
18.043537 31.425346 l
40.051643 -0.001892 l
59.649284 -0.001892 l
33.949379 32.942837 l
45.960430 35.291912 52.544785 43.140373 52.544785 55.101234 c
h
f*
n
Q
q
1.000000 0.000000 -0.000000 1.000000 228.046875 215.203125 cm
/Pattern cs
/P1 scn
85.162064 40.745396 m
85.162064 18.241005 66.106773 0.000763 42.579445 0.000763 c
19.058464 0.000763 0.000000 18.241005 0.000000 40.745396 c
0.000000 63.252819 19.058464 81.496094 42.579445 81.496094 c
66.106773 81.496094 85.162064 63.252819 85.162064 40.745396 c
f*
n
Q
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 228.046875 215.203125 cm
/Pattern cs
/P2 scn
85.162064 40.745396 m
85.162064 18.241005 66.106773 0.000763 42.579445 0.000763 c
19.058464 0.000763 0.000000 18.241005 0.000000 40.745396 c
0.000000 63.252819 19.058464 81.496094 42.579445 81.496094 c
66.106773 81.496094 85.162064 63.252819 85.162064 40.745396 c
f*
n
Q

endstream
endobj

11 0 obj
  4587
endobj

12 0 obj
  << /Annots []
     /Type /Page
     /MediaBox [ 0.000000 0.000000 512.000000 512.000000 ]
     /Resources 9 0 R
     /Contents 10 0 R
     /Parent 13 0 R
  >>
endobj

13 0 obj
  << /Kids [ 12 0 R ]
     /Count 1
     /Type /Pages
  >>
endobj

14 0 obj
  << /Pages 13 0 R
     /Type /Catalog
  >>
endobj

xref
0 15
0000000000 65535 f
0000000010 00000 n
0000000466 00000 n
0000000488 00000 n
0000001916 00000 n
0000001938 00000 n
0000002855 00000 n
0000002877 00000 n
0000003398 00000 n
0000003420 00000 n
0000004944 00000 n
0000009589 00000 n
0000009613 00000 n
0000009791 00000 n
0000009867 00000 n
trailer
<< /ID [ (some) (id) ]
   /Root 14 0 R
   /Size 15
>>
startxref
9928
%%EOF% 

(this is the one I'm adding:)

$ cat logo_discover-white.pdf 
%PDF-1.1
1 0 obj
<<
    /Type /Catalog
    /Pages 2 0 R
>>
endobj
2 0 obj
<<
    /Type /Pages
    /Kids [ 6 0 R ]
    /Count 1
>>
endobj
3 0 obj
<<
    /Pattern <<
        /P1 <<
            /Type /Pattern
            /PatternType 2
            /Matrix [ 53 -64 64.524 53.434 174.523 231.047 ]
            /Shading 4 0 R
        >>
        /P2 <<
            /Type /Pattern
            /PatternType 2
            /Matrix [ -34.5 44 -45.98 -36.052 280.003 238.998 ]
            /Shading 5 0 R
        >>
    >>
>>
endobj
4 0 obj
<<
    /ShadingType 2
    /ColorSpace /DeviceRGB
    /Extend [ true true ]
    /Function <<
        /FunctionType 3
        /Encode [ 0 1 0 1 0 1 0 1 0 1 ]
        /Domain [ 0 1 ]
        /Bounds [ 0.2 0.4 0.6 0.8 ]
        /Functions [ <<
                    /FunctionType 2
                    /C0 [ 0.903 0.469 0.186 ]
                    /C1 [ 0.906 0.498 0.183 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.906 0.498 0.183 ]
                    /C1 [ 0.909 0.527 0.181 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.909 0.527 0.181 ]
                    /C1 [ 0.912 0.557 0.178 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.912 0.557 0.178 ]
                    /C1 [ 0.915 0.586 0.175 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.915 0.586 0.175 ]
                    /C1 [ 0.915 0.586 0.175 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> ]
    >>
    /Coords [ 0 0 1 0 ]
>>
endobj
5 0 obj
<<
    /ShadingType 3
    /ColorSpace /DeviceRGB
    /Extend [ true true ]
    /Function <<
        /FunctionType 3
        /Encode [ 0 1 0 1 0 1 0 1 0 1 ]
        /Domain [ 0 1 ]
        /Bounds [ 0.2 0.4 0.6 0.8 ]
        /Functions [ <<
                    /FunctionType 2
                    /C0 [ 0.918 0.616 0.173 ]
                    /C1 [ 0.891 0.522 0.153 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.891 0.522 0.153 ]
                    /C1 [ 0.854 0.435 0.141 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.854 0.435 0.141 ]
                    /C1 [ 0.796 0.357 0.139 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.796 0.357 0.139 ]
                    /C1 [ 0.706 0.277 0.129 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> <<
                    /FunctionType 2
                    /C0 [ 0.706 0.277 0.129 ]
                    /C1 [ 0.706 0.277 0.129 ]
                    /Domain [ 0 1 ]
                    /N 1
                >> ]
    >>
    /Coords [ 0 0 0 0 0 1 ]
>>
endobj
6 0 obj
<<
    /Type /Page
    /Parent 2 0 R
    /Resources 3 0 R
    /MediaBox [ 0 0 512 512 ]
    /Annots [  ]
    /Contents 7 0 R
>>
endobj
7 0 obj
<<
    /Filter /FlateDecode
    /Length 936
>>
stream
x??UI?7
       ??<?$?=??????A?????3???4~?/3?&@$?Jc
                                          ??(???G??w?????4??^!??W?Il8?(?"?lh&e
                                                                              ?X?X
W?*-?z?M?`_???.?n?6$i????ƃ??	?$~?R
?X2.h]?n/SI?4?W??O??9?Q???Xp?`?>?6??ib?j-l?+([?j?j@??z?Q/ւH>j??(r?
                                                                  5uu#آ?^?y??Tު
                                                                              x"???62a"z???AX??R|?D"/?RDu#r???e??D???,?*???hIFn@i2?h?F?%?nIY??G7 ???7?u??d?}?@ A)C?v#?w??u??%??fhA<? 1??ӳn=???F?P ?????4??????DWi?Ȉ????u?????E??T???@{?:??xp?f	?s????j???{???????:?J7MQ?????iݪ?,?(?[D%??Y???ORs??U?!?z%Yn??????
?p? ?|?=??NQHL??͉X?'"??e_?`d?cS???s?????f?s?????:f
                                                 ?G?i??F;um?}V}?"s??T?1?9ߛ!Ca?mSd+s{s????sÎ~?{7P??`{?d贞?????????xob?r?????1??#??O?1??*߁?p_,ś?̥D?=*?8??? ???B???Ƿ?a?r????K8??????V?1v?}w??+,zyFw?0\?|k???????]?3?:&?9???'??wn
                                                            ?k??zN|XR>q??\??
                                                                            ???????????[?~??_4???A??@)tx????v秹?0zXck?p???G??B???`??U???vup??7???d??9??EN?|j?
endstream
endobj
xref
0 8
0000000000 65535 f 
0000000009 00000 n 
0000000066 00000 n 
0000000137 00000 n 
0000000520 00000 n 
0000001863 00000 n 
0000003210 00000 n 
0000003353 00000 n 
trailer
<<
    /Root 1 0 R
    /Size 8
>>
startxref
4369
%%EOF

so it's apparently smaller, but the difference is in the "stream" binary content — judging by the Filter /FlateDecode it's a compression filter for zlib/deflate content.

Seeing none of the other assets use compressed streams/postscript, maybe I should look into converting the files from 1.1 to 1.7 and making sure it's all plaintext and no compression. It will be order of magnitude larger, but it perhaps performs better in target device rasterization? dunno

@lmarceau
Copy link
Contributor

@janbrasna do you happen to know what size the image should be ?

@janbrasna
Copy link
Contributor Author

janbrasna commented Jan 29, 2026

"square"? ;D I'm not sure how intrinsic sizing works with PDFs, it does appear like 512 × 512px to me.

Maybe I'll just go ahead and get rid of the optimization, and convert it to the same v1.7 plaintext as used elsewhere and never look back. It's not worth the ~25kB difference.


EDIT: So with a little bit of tlc and flattening the PDFs I was actually able to convert to 1.7 uncompressed that are pretty much the same file size, so I'm fine with these I think…

@lmarceau
Copy link
Contributor

lmarceau commented Feb 2, 2026

It's green ✅ Merging!Thank you Jan!

@lmarceau lmarceau merged commit b57acb4 into mozilla-mobile:main Feb 2, 2026
8 checks passed
@janbrasna janbrasna deleted the upd/card-logos branch February 2, 2026 20:55
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

Successfully merging this pull request may close these issues.

3 participants