RedHat-UX / red-hat-design-tokens

Red Hat design tokens
https://red-hat-design-tokens.netlify.app/
MIT License
14 stars 2 forks source link

New Tokens: Code Color Scheme #16

Open bennypowers opened 2 years ago

bennypowers commented 2 years ago

We need a code syntax color scheme for prism, and alternatively for vim/v****e

coreyvickery commented 2 years ago

@bennypowers Does this refer to colors for syntax highlighting?

bennypowers commented 2 years ago

yes, so we could use it for markdown highlighting, code playgrounds, snippets, and editor color themes, whathaveyou

coreyvickery commented 2 years ago

@bennypowers This is in progress, I am working with other design teams to try and unify one color scheme. It would be great to see examples of the things you need these values for even if they are quick screenshots.

bennypowers commented 2 years ago

https://github.com/PrismJS/prism-themes

bennypowers commented 2 years ago

I'd recommend starting by defining terminal ascii colours, for example this version of Catppuccin Mocha for Black Box terminal

from there we can then do a prism syntax theme, treesitter syntax theme (e.g. that same catppuccin theme for neovim)

coreyvickery commented 2 years ago

@bennypowers I think I can provide you with values because we are moving on to creating rh-code-block.

https://github.com/RedHat-UX/red-hat-design-system/issues/328

bennypowers commented 2 years ago

I added this to 1.0 milestone, since it's WIP

bennypowers commented 1 year ago

We need this for demo playgrounds as well (spin this out into a new issue later on)

coreyvickery commented 1 year ago

@bennypowers How would you like me to deliver this information to you? Do you need the hex color codes and token names? Anything else?

bennypowers commented 1 year ago

yeah that should do. you're welcome to start a pr if you're interested

bennypowers commented 1 year ago

Here are some token (by which i mean programming language token, not design token) names from prism.js, loosely sorted into three groups by order of importance

comment
property
keyword
tag
class-name
boolean
constant
punctuation
number
attr-name
string
symbol
variable
operator
attr-value
function
regex

namespace
deleted
selector
char
builtin
inserted
entity
url
atrule
important

prolog
doctype
cdata

I get the sense that if we assign token (design tokens) to these, that's pretty much job done.

TODO: demo codepen for Corey to muck about with, featuring:

coreyvickery commented 1 year ago

@marionnegp Tagging you to take over.

coreyvickery commented 1 year ago

@bennypowers @nikkimk Current colors, see screens 3 and 9.

https://xd.adobe.com/view/c4cc943e-618d-4fbe-8ab2-8e29fd135393-919f/

Let me know if you have specific questions about where to apply them.

bennypowers commented 1 year ago

are those existing crayon colours?

markcaron commented 8 months ago

Feel free to disagree, but as for the language support, I'd say...

Need first

  1. HTML/JS/CSS
  2. Bash
  3. Typescript
  4. Markdown
  5. JSON
  6. YAML

Next set

  1. PHP
  2. Python
  3. Java
  4. Twig
  5. C#
  6. Go
  7. Rust

And anything else forgetting.