Skip to content

Conversation

@thecodewarrior
Copy link

@thecodewarrior thecodewarrior commented Dec 9, 2020

This PR makes a few improvements to Aha's color handling:

  • It creates a test program test_print.c which outputs a page of formatting codes to test Aha with
    image
  • It replaces the old highlighted flag with proper 4-bit color support, including .bg-highlighted for independent foreground/background highlighting. Other than that I made sure to maintain CSS backward compatibility, which is why I stuck with the old .highlighted.<color> classes instead of doing separate classes for the normal and bright versions of colors.
  • Fixes a bug where a non-4-bit foreground color and a 4-bit background color would end up placing the 4-bit background class (e.g. bg-red) in the tag's style attribute instead of the class attribute.
  • It supplements the built-in color schemes with configurable ones using the --colors parameter

Because highlighting no longer uses a CSS filter and instead is a separate color, at the moment the built-in color schemes have no normal/bright distinction. I didn't want to go ahead and decide on a color scheme since, in the end, it's your project.

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.

1 participant