OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
668 stars 95 forks source link

Office theme colors missing or shifted #4700

Open sami-romdhana opened 1 month ago

sami-romdhana commented 1 month ago

Your Environment

Expected behavior

I want OfficeThemes.css variables to be an exact match of the theme colors as seen in the Custom Colors window.

Screenshot 2024-07-19 141927-min

Current behavior

Some colors are either shifted, or are completely missing.

Theme 1

Seeing the Office theme colors window and "sample" area, it seems that "Text/Background - Dark 1" as font color goes with "Text/Background - Light 2" as background color, and that "Text/Background - Light 1" as font color goes with "Text/Background - Dark 2" as background color.

Screenshot 2024-07-19 113131-min

Office theme colors

Theme color name Value in Office
Text/Background - Dark 1 #595959
Text/Background - Light 1 #FFFFFF
Text/Background - Dark 2 #FF4648
Text/Background - Light 2 #FFF0F0
Accent 1 #625CFA
Accent 2 #B1D0FF
Accent 3 #050921
Accent 4 #FFD6FB
Accent 5 #FCC14E
Accent 6 #F7DA9F
Hyperlink #FF4648
Followed Hyperlink #FF4648

OfficeThemes.css colors

CSS variable name Value
.office-docTheme-primary-fontColor #595959
.office-docTheme-primary-bgColor #FEFEFE
.office-docTheme-secondary-fontColor #595959
.office-docTheme-secondary-bgColor #FFF0F0
.office-contentAccent1-*color #5F57F9
.office-contentAccent2-*color #AFCFFE
.office-contentAccent3-*color #050922
.office-contentAccent4-*color #FFD5FB
.office-contentAccent5-*color #FEC253
.office-contentAccent6-*color #F8DBA0
.office-a #FF464D
.office-a:visited #FF464D
.office-officeTheme-primary-fontColor #454545
.office-officeTheme-primary-bgColor #FFFFFF
.office-officeTheme-secondary-fontColor #444444
.office-officeTheme-secondary-bgColor #FCFCFC

Comments and notes

Theme 2

Office theme colors

Theme color name Value in Office
Text/Background - Dark 1 #595959
Text/Background - Light 1 #FFFFFF
Text/Background - Dark 2 #3DC7FF
Text/Background - Light 2 #0782BE
Accent 1 #EB5D16
Accent 2 #E6E6E6
Accent 3 #FEC008
Accent 4 #FD8124
Accent 5 #04DAAB
Accent 6 #595959
Hyperlink #3DC7FF
Followed Hyperlink #0782BE

OfficeThemes.css colors

CSS variable name Value
.office-docTheme-primary-fontColor #2BC6FE
.office-docTheme-primary-bgColor #0181BD
.office-docTheme-secondary-fontColor #2BC6FE
.office-docTheme-secondary-bgColor #FFFFFF
.office-contentAccent1-*color #EE5E21
.office-contentAccent2-*color #E6E6E6
.office-contentAccent3-*color #FFC11C
.office-contentAccent4-*color #FF822D
.office-contentAccent5-*color #01DBAA
.office-contentAccent6-*color #5A5A5A
.office-a #2BC6FE
.office-a:visited #0181BD
.office-officeTheme-primary-fontColor #454545
.office-officeTheme-primary-bgColor #FFFFFF
.office-officeTheme-secondary-fontColor #454545
.office-officeTheme-secondary-bgColor #FFFFFF

Comments and notes

Steps to reproduce

  1. Have a custom theme in PowerPoint
  2. Pull the colors using OfficeThemes.css
  3. Compare the colors

Context

We are trying to pull client theming automatically with no user intervention or hard coding, having colors missing hampers our efforts to integrate our content add-in with the rest of our clients' content.

EsterBergen commented 1 month ago

@micahgodbolt - Can you investigate?

micahgodbolt commented 1 month ago

@micahgodbolt - Can you investigate?

The theme here is pretty specific to Office, and not Fluent. I'm not sure what help I can offer here.

touss59 commented 1 month ago

Hello @EsterBergen,

Do you have another person in mind to investigate this problem?

Thank you in advance for your reply.

EsterBergen commented 1 month ago

Thanks for the ping @touss59 - we are continuing to look into this and will share updates once we know more. Thanks.