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

asciicast v2: stored color theme spec #221

Closed
ku1ik opened this issue Sep 4, 2017 · 1 comment
Closed

asciicast v2: stored color theme spec #221

ku1ik opened this issue Sep 4, 2017 · 1 comment
Milestone

Comments

@ku1ik
Copy link
Contributor

ku1ik commented Sep 4, 2017

We're discussing version 2 of asciicast format in #196, and I think adding optional colors object to the header, containing text foreground/background color and the palette for all 8(16) colors would be a nice addition. It could be saved automatically by asciinema rec and used by web player.

As @mrabault said in asciinema/discussions#8, we can use and update a technique of obtaining the colors, as long as the palette representation in asciicast header stays the same/compatible with the web player. As for the actual technique, let's keep it discussed in asciinema/discussions#8.

Anyway, what we can add to v2 header is the optional key named colors (or theme ?):

{
  "version": 2,
  "width": 80,
  "height": 24,
  "theme": {
    "fg": "#d0d0d0",
    "bg": "#212121",
    "palette": "#151515:#ac4142:#7e8e50:#e5b567:#6c99bb:#9f4e85:#7dd6cf:#d0d0d0:#505050:#ac4142:#7e8e50:#e5b567:#6c99bb:#9f4e85:#7dd6cf:#f5f5f5"
  }
}

I took inspiration to use single string value for all 16 colors from Terminator theme syntax which is compact and it's easy to write/read/parse for both humans and machines.

@ku1ik ku1ik changed the title asciicast v2: color palette spec asciicast v2: color theme spec Sep 4, 2017
@ku1ik ku1ik changed the title asciicast v2: color theme spec asciicast v2: stored color theme spec Sep 4, 2017
@ku1ik ku1ik modified the milestone: 2.0 Sep 6, 2017
This was referenced Sep 17, 2017
@ku1ik
Copy link
Contributor Author

ku1ik commented Sep 17, 2017

This was added to the v2 spec in #233.

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

1 participant