a11y-syntax-highlighting icon indicating copy to clipboard operation
a11y-syntax-highlighting copied to clipboard

Tm Theme Editor

Open earlev4 opened this issue 5 years ago • 14 comments

Hi!

Good day to you! I greatly appreciate the efforts and work going into the a11y-syntax-highlighting project. I have seen much positive feedback on A11y Dark theme on Carbon and I share that sentiment. A11y Dark is one of the best themes I have seen in a while. Are you aware of any efforts to add A11y Dark theme to the Tm Theme Editor Website?

https://tmtheme-editor.herokuapp.com/#!/editor/theme/Monokai

I would be happy to assist to build one but would need to know all of the possible scope names and associated foreground/background hex values. I would not want to make any assumptions and diverge from the appropriate color theme.

Thanks so much!

earlev4 avatar Apr 02 '20 04:04 earlev4

Hey there! Thank you for the kind words, it means a lot to me.

I've got color names and values listed in the README for the dark and light themes, as well as their corresponding WCAG level of compliance when placed on the background color.

If you want to create a PR for tmTheme Editor, I say go for it! I'd appreciate a link when you're done, just to check it out 🙂

ericwbailey avatar Apr 02 '20 15:04 ericwbailey

can you make a theme for Xcode as well?

alamodey avatar Dec 09 '20 10:12 alamodey

@alamodey Great idea! I'll start chipping away at it.

ericwbailey avatar Dec 09 '20 16:12 ericwbailey

@alamodey I added a dark mode theme for Xcode: https://github.com/ericwbailey/a11y-syntax-highlighting/tree/main/dist/xcode

I don't spend a lot of time in that editor. Does it feel right to you? If so, I'll whip up a light theme. Happy to make tweaks, too.

ericwbailey avatar Dec 10 '20 01:12 ericwbailey

Screen Shot 2020-12-11 at 5 18 13 pm It looks a bit different to what I expected

alamodey avatar Dec 11 '20 06:12 alamodey

Are you sure the correct theme is highlighted? This is how the preview looks on my end of things:

The 'A11Y Dark' theme selected in Xcode, with exampled colored code tokens.

ericwbailey avatar Dec 11 '20 17:12 ericwbailey

Screen Shot 2020-12-12 at 10 02 03 am

alamodey avatar Dec 11 '20 23:12 alamodey

Is it because I'm in dark mode?

alamodey avatar Dec 11 '20 23:12 alamodey

Oh, I think I got it!

Set your colors to the following:

  • Background: #2B2B2B
  • Current Line: #000000
  • Selection: #000000
  • Cursor: #FFFFFF
  • Invisibles: #565655

I assumed these values were included as part of the theme data, but it appears that they're not?

ericwbailey avatar Dec 12 '20 01:12 ericwbailey

There must be a way to include it in the theme data because all the other themes I download on Xcode work fine.

Perhaps you need to temporarily change your MacOS to dark mode and then set the colours again.

alamodey avatar Dec 12 '20 07:12 alamodey

Yeah, I'll investigate. So weird.

ericwbailey avatar Dec 12 '20 19:12 ericwbailey

So, I tried toggling dark mode on and off and the background, current line color, etc. persist. I'm also not seeing an option to include those values in the export, as exporting is just copying the .xccolortheme out of ~/Library/Developer/Xcode/UserData/FontAndColorThemes/.

Do you know of another way to export?

ericwbailey avatar Dec 13 '20 00:12 ericwbailey

I am not familiar with creating themes but what if you went to the github of another theme like this: https://github.com/bojan/xcode-one-dark

and just replace their colours with yours?

alamodey avatar Dec 19 '20 04:12 alamodey

I just ran through and manually compared those key definitions with what I have. Weirdly, I have more, but nothing in either theme that speaks to the missing background color, etc.

ericwbailey avatar Dec 23 '20 16:12 ericwbailey